Multiple Choice
What will be displayed as a result of executing the following code? int x = 6;
String msg = "I am enjoying this class.";
String msg1 = msg.toUpperCase() ;
String msg2 = msg.toLowerCase() ;
Char ltr = msg.charAt(x) ;
Int strSize = msg.length() ;
System.out.println(msg) ;
System.out.println(msg1) ;
System.out.println(msg2) ;
System.out.println("Character at index x = " + ltr) ;
System.out.println("msg has " + strSize + "characters.") ;
A) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 24 characters.
B) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = e
Msg has 25 characters.
C) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 24 characters.
D) I am enjoying this class.
I AM ENJOYING THIS CLASS.
I am enjoying this class.
Character at index x = n
Msg has 25characters.
Correct Answer:

Verified
Correct Answer:
Verified
Q13: Variables of the boolean data type are
Q14: Which of the following is valid?<br>A) float
Q15: Which of the following is a value
Q16: In the following Java statement, what value
Q17: If the compiler encounters a statement that
Q19: What is the value of z after
Q20: What would be displayed as a result
Q21: What output will be displayed as a
Q22: Both character and string literals can be
Q23: Which of the following cannot be used