Strings
- Which of these keywords is used to refer to member of base class from a subclass?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Whenever a subclass needs to refer to its immediate superclass, it can do so by use of the keyword super.
- Which of these method of String class is used to obtain character at specified index?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
charAt()
- String in Java is a?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
class
- What will s2 contain after following lines of code?
String str1 = "one";
String str2 = str1.concat("two")
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Two strings can be concatenated by using concat() method.
- Which of these method of class StringBuffer is used to find the length of current character sequence?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
length()