What does the following statement sequence print? String str = "Harry";
Int n = str.length() ;
String mystery = str.substring(0, 1) + str.substring(n - 2, n) ;
System.out.println(mystery) ;
A) Ha
B) Har
C) Hy
D) Hry
Correct Answer:
Verified
Q15: The assignment operator
A)denotes mathematical equality
B)places a new
Q18: Which of the following statements about constants
Q19: Which statement is true?
A)Variables cannot be assigned
Q29: Which statements about numeric types in Java
Q72: What is result of evaluating the following
Q74: What is the output of this code
Q75: What does the following statement sequence print
Q79: What does the following statement sequence print
Q82: What is wrong with the following code
Q98: The first step in problem solving is
A)To
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents