Java 1
Question 20
What will be printed by the following code?

String str = "Have a nice day!";
System.out.println(str.length());

a. Have a nice day
b. 16
c. 13
d. Have
e. 4

Question 21
Examine this code:

String str = "Hello World!" ;

What is the index of the character 'W'?

a. 6
b. 7
c. 5
d. 8
e. 2