Question: Consider the following code: What is the output when the user types the following values? a. Jane b. 56 c. 56.2 Scanner console new Scanner
Consider the following code:

What is the output when the user types the following values?
a. Jane
b. 56
c. 56.2
Scanner console new Scanner (System.in); !! System.out..print ("Type something for me! "); if (console.hasNextInt () ) { int number = console.nextInt (); System.out.println ("Your IQ is " + number); } else if (console.hasNext ()) { String token console.next (); %3D System.out.println ("Your name is " + token);
Step by Step Solution
3.33 Rating (165 Votes )
There are 3 Steps involved in it
The code will have the following behavi... View full answer
Get step-by-step solutions from verified subject matter experts
