Strings


  1. Which of these keywords is used to refer to member of base class from a subclass?











  1. 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.


  1. Which of these method of String class is used to obtain character at specified index?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    charAt()



  1. String in Java is a?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    class


  1. What will s2 contain after following lines of code?

    String str1 = "one";
    String str2 = str1.concat("two")











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    Two strings can be concatenated by using concat() method.



  1. Which of these method of class StringBuffer is used to find the length of current character sequence?











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    length()