What does the following statement sequence print? String str = "Hello";
Int n = str.length() ;
String mystery = str.substring(0, 1)
+ str.substring(n - 2, n + 1) ;
System.out.println(mystery) ;
A) Run-time error
B) He
C) Ho
D) Hry
Correct Answer:
Verified
Q57: Which one of the following statements displays
Q59: What is the output of the following
Q60: Which of the following is the
Q61: What does the following statement sequence print?
Q63: What does the following statement sequence print?
Q64: What is the output of this code
Q65: What is the difference between the result
Q66: What does the following statement sequence print?
Q67: What is the output of the following
Q100: Which one of the following statements displays
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