Solved

What Does the Following Statement Sequence Print If the User

Question 48

Multiple Choice

What does the following statement sequence print if the user input is 123?
Public static void main(String[] args)
{
Scanner in = new Scanner(System.in) ;
System.out.print("Enter a number ") ;
Int myInt = in.nextInt() ;
MyInt += 456;
System.out.println(myInt) ;
}


A) 579
B) Compile-time error
C) Run-time error
D) 123456

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions