Computer Applications
Which of these class is superclass of String and StringBuffer class?
- java.util
- java.lang
- ArrayList
- None of the mentioned
Related Questions
Suppose that s1 and s2 are two strings. Which of the statements or expressions are incorrect ?
- String s3 = s1 + s2;
- String s3 = s1 - s2;
- s1.compareTo(s2);
- int m = s1.length( );
Given the code :
String s = new String("abc");Which of the following calls are invalid ?
- s.trim( )
- s.replace('a', 'A')
- s.substring(3)
- s.toUpperCase( )
- s.setCharAt(1, 'A')
Which of these methods of class String is used to obtain length of String object?
- get( )
- Sizeof( )
- lengthof( )
- length( )
Which of these methods of class String is used to extract a single character from a String object?
- CHARAT( )
- chatat( )
- charAt( )
- ChatAt( )