Which one of the following statements can be used to extract the last five characters from any string variable str?
A) str.substring(str.length() - 5, str.length() )
B) str.substring(5, 5)
C) str.substring(str.length() - 4, 5)
D) str.substring(str.length() - 5, 5)
Correct Answer:
Verified
Q20: What will be the value inside the
Q22: Assuming that the user enters 45 and
Q23: Which is the Java equivalent of the
Q26: Which one of the following is a
Q28: Which of the following is the
Q46: What happens to the fractional part when
Q87: What is the result of the following
Q112: Which operator is used to concatenate two
Q116: How do you compute the length of
Q119: Which of the methods below are static
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