String

Quiz Guidelines

 

Multiple Choice Question

QID: 
17

Given:

class HelloWorld{

  public static void main (String[] args)
  {
    System.out.println("Hello"+1+3-2);
  }

}

A. Compilation fail

B. Compilation succeeds, but execution will fail with an exception

C. Compile and run successfully and print Hello123

D. Compile and run successfully and print Hello11

Multiple Choice Question

QID: 
16

Given:

class HelloWorld{

  public static void main (String[] args)
  {
    System.out.println("Hello"+1+3-2);
  }

}

A. Compilation fail

B. Compilation succeeds, but execution will fail with an exception

C. Compile and run successfully and print Hello123

D. Compile and run successfully and print Hello11

Multiple Choice Question

QID: 
15

Given:

class HelloWorld{

  public static void main (String[] args)
  {
    System.out.println("Hello"+1*2+3);
  }

}

A. Compilation fail

B. Compilation succeeds, but execution will fail with an exception

C. Compile and run successfully and print Hello23

D. Compile and run successfully and print Hello123