Examlex
Assuming that a user enters 22 as the price of an object, which of the following hand-trace tables is valid for the given code snippet?
Int price = 0;
String status = "";
Scanner in = new Scanner(System.in) ;
System.out.print("Please enter object's price: ") ;
Price = in.nextInt() ;
If (price >= 50)
{
Status = "reasonable";
If (price >= 75)
{
Status = "costly";
}
}
Else
{
Status = "inexpensive";
If (price <= 25)
{
Status = "reasonable";
}
}
Q7: What does the following statement sequence print?
Q24: What is the output of the following
Q39: One of the corresponding methods for a
Q42: Which method checks whether a point lies
Q55: Consider the classes shown below: public class
Q70: What is the value of num after
Q99: Select the statement that reveals the logic
Q108: What will be printed by the statements
Q118: When an array myArray is only partially
Q122: A student's class average can be computed