Java OCA OCP Practice Question 728

Question

What will be the output of the following program (excluding the quotes)?

public class Main{ 
   public static void main (String args []){ 
      String String = "string isa string"; 
      System.out.println (String.substring (3, 6)); 
    } 
} 

Select 1 option

  • A. It will not compile.
  • B. "ing is"
  • C. "ing isa"
  • D. "ing " (There is a space after g)
  • E. None of the above.


Correct Option is  : E



PreviousNext

Related