Multiple Choice
Assuming that the user enters 45 and 62 as inputs for n1 and n2, respectively, what is the output of the following code snippet? public static void main(String[] args)
{
System.out.print("Enter a number: ") ;
Scanner in = new Scanner(System.in) ;
String n1 = in.next() ;
System.out.print("Enter another number: ") ;
String n2 = in.next() ;
String result = n1 + n2;
System.out.print(result) ;
}
A) 46
B) 4662
C) 107
D) 4562
Correct Answer:

Verified
Correct Answer:
Verified
Q22: What is the value of the following
Q29: In an airline reservation system, the number
Q78: Which option represents the best choice for
Q87: What is the value of the following
Q110: Which of the following statements is correct
Q117: What is the output of the following
Q118: What does the following statement sequence print?
Q119: Which of the following is the
Q121: The problem solving process emphasizes a "first,
Q122: A student's class average can be computed