Home / CSE MCQs / JAVA MCQs :: Discussion

Discussion :: JAVA MCQs

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

     String s1 = "one;

     String s2 = s1.concat("two)

  2. A.
    one
    B.
    two
    C.
    onetwo
    D.
    twoone

    View Answer

    Workspace

    Answer : Option C

    Explanation :

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


Be The First To Comment