Examlex
What is the sentinel value in the following code snippet? public static void main(String[] args)
{
Int age = 0;
Int sumOfAges = 0;
Int stop = 1;
Scanner reader = new Scanner(System.in) ;
System.out.println("Enter an age (-1 to stop) : ") ;
Age = reader.nextInt() ;
While (age != -1)
{
SumOfAges = sumOfAges + age;
System.out.println("Enter an age (-1 to stop) : ") ;
Age = reader.nextInt() ;
}
System.out.println("Sum of ages " + sumOfAges) ;
Return 0;
}
Q14: Which of the following corresponds to a
Q19: Which of the following can potentially be
Q59: What is the output of the following
Q74: What is the purpose of the assignment
Q75: Which one of the following is a
Q76: Which one of the following statements is
Q77: What is the output of the following
Q87: What is the output of the following
Q97: Which one of the following statements displays
Q109: Which statements about numeric types in Java