What will be displayed as a result of executing the following code? int x = 8; String msg = "I am enjoying java."; 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 java.
I AM ENJOYING JAVA.
i am enjoying java.
Character at index x = j
msg has 20 characters.
b. I am enjoying java.
I AM ENJOYING JAVA.
i am enjoying java.
Character at index x = o
msg has 20 characters.
c. I am enjoying java.
I AM ENJOYING JAVA.
i am enjoying java.
Character at index x = o
msg has 19 characters.
d. I am enjoying java.
I AM ENJOYING JAVA.
i am enjoying java.
Character at index x = y
msg has 19 characters.
c. I am enjoying java.
I AM ENJOYING JAVA.
i am enjoying java.
Character at index x = o
msg has 19 characters.
You might also like to view...
The best time to develop application test plans is:
a. During requirements and specifications development b. During application design c. During application testing d. During application coding
A(n) ________ is the information the user wants to share, using Impress as the method of communication
A) theme B) presentation C) template D) speech
Arduino programs spend most of the time running in a ________ method.
Fill in the blank(s) with the appropriate word(s)
Major microprocessor manufacturers are
A) Apple, Gateway, and Dell B) Intel, Motorola, and AMD C) Maxtor, Seagate, and Sony D) Microsoft, 3-Com, and Oracle