Podcast
Questions and Answers
What are the three main control structures in any programming language?
What are the three main control structures in any programming language?
Which control structure is used to choose between alternative courses of action?
Which control structure is used to choose between alternative courses of action?
What determines the order in which statements or instructions are carried out in a Java program?
What determines the order in which statements or instructions are carried out in a Java program?
Which keyword is used for the selection structure in Java?
Which keyword is used for the selection structure in Java?
Signup and view all the answers
What type of control structure is used for executing instructions repeatedly until a logical condition is satisfied?
What type of control structure is used for executing instructions repeatedly until a logical condition is satisfied?
Signup and view all the answers
In a Java program, which control structure is used when one group of statements is selected from several available groups?
In a Java program, which control structure is used when one group of statements is selected from several available groups?
Signup and view all the answers
What happens if the expression in an if statement is false?
What happens if the expression in an if statement is false?
Signup and view all the answers
Which operator is used to check if a value is greater than or equal to another value?
Which operator is used to check if a value is greater than or equal to another value?
Signup and view all the answers
In Java, what is the syntax for the if statement?
In Java, what is the syntax for the if statement?
Signup and view all the answers
What should be done after the if statement in Java to maintain proper code indentation?
What should be done after the if statement in Java to maintain proper code indentation?
Signup and view all the answers
Which symbol is used in Java to check for equality between two values?
Which symbol is used in Java to check for equality between two values?
Signup and view all the answers
What does the following code do: if (balance > 0) { fee = 0; } ?
What does the following code do: if (balance > 0) { fee = 0; } ?
Signup and view all the answers
What does the following code do: if (hrsWked > 38) { System.out.print('Overtime hours: ' + (hrsWked - 38)); } ?
What does the following code do: if (hrsWked > 38) { System.out.print('Overtime hours: ' + (hrsWked - 38)); } ?
Signup and view all the answers
What does the following code do: if (length == width) { System.out.print('it is square'); } ?
What does the following code do: if (length == width) { System.out.print('it is square'); } ?
Signup and view all the answers
What does the following code do: if (totalPrice >= 100) { disc = totalPrice * 0.1; totalPrice = totalPrice - disc; } ?
What does the following code do: if (totalPrice >= 100) { disc = totalPrice * 0.1; totalPrice = totalPrice - disc; } ?
Signup and view all the answers
'Java Math Notation Description' mentions which operator for 'Greater than or equal to'?
'Java Math Notation Description' mentions which operator for 'Greater than or equal to'?
Signup and view all the answers