String in Java

Programming Language > Java Programming Language

Assess your understanding of Java Strings with these multiple choice questions. Learn about the different operations and methods for manipulating strings in Java and become a proficient Java developer. Take the quiz now! ➲ String in Java - Quiz


  • A Throws an exception as string and int are not compatible for addition
  • B hellow9
  • C 9hellow
  • D Compilation error
  • A java.lang.String
  • B java.lang.Object
  • C java.lang.util
  • D None of these
  • A true
  • B false
  • C an int value
  • D 1
  • A 2
  • B 7
  • C 13
  • D None of this
  • A java.awt
  • B java.lang
  • C java.applet
  • D java.string
  • A The first occurrence of k is replaced by a.
  • B All characters k are replaced by a.
  • C All characters a are replaced by k.
  • D Displays error message
  • A S1=123456, S2=579
  • B S1=123456,S2=123456
  • C S1=579,S2=579
  • D None of This
  • A one.two.three.
  • B Compilation fails because of an error at line 3
  • C Compilation fails because of an error at line 5
  • D An exception is thrown at runtime.