Computer Applications
The output of "Remarkable".substring(6) is:
- mark
- emark
- marka
- able
Java String Handling
ICSE Sp 2024
30 Likes
Answer
able
Reason — "Remarkable".substring(6) will extract a substring starting from the character at index 6 (i.e., 7th character of the string) which is 'a' till the end of the string. Hence the output is able.
Answered By
17 Likes
Related Questions
Name the type of error, if any in the following statement:
System.out.print("HELLO")- logical
- no error
- runtime
- syntax
Java statement to access the 5th element of an array is:
- X[4]
- X[5]
- X[3]
- X[0]
Which of the following is the wrapper class for the data type char?
- String
- Char
- Character
- Float
Name the package that contains wrapper classes:
- java.lang
- java.util
- java.io
- java.awt