Multiple Choice
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
Correct Answer:
Verified
Related Questions
Q2: Assuming that the user inputs a value
Q5: What is the value inside the value
Q6: What is the output of the following
Q8: What is wrong with the following code
Q9: What will be the value inside the
Q10: Which one of the following is a
Q11: Assume the variable str has been declared
Q47: The typical ranges for integers may seem
Q49: Which one of the following statements displays
Q60: Which of the given System.out.print statements generates