Q.1
String s = "Java String Quiz"; System.out.println(s.charAt(s.toUpperCase().length()));
  • Convert “Z” to int 90 and prints “90”
  • Runtime Exception
  • Prints “z”
  • Prints “Z”
Q.2
String obj = "I LIKE JAVA";System.out.println(obj.length());
  • 9
  • 10
  • 11
  • 12
Q.3
Which of these method of String class can be used to test to strings for equality?
  • isequal()
  • isequals()
  • equal()
  • equals()
Q.4
Which of these keywords is used to refer to member of base class from a subclass?
  • upper
  • super
  • this
  • none
Q.5
Which of these method of String class is used to obtain character at specified index?
  • char()
  • Charat()
  • charat()
  • charAt()
Q.6
String in Java is a?
  • class
  • object
  • variable
  • character array
0 h : 0 m : 1 s