Multiple choice

What is the output of the following program?

public class Demo

{ public static void main(String arg[])
{
System.out.println(“Helloworld”);
}
}

  1. Compile time error

  2. Run time error

  3. Helloworld

  4. Garbage value

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The code is valid Java syntax. It defines a class with a main method that prints 'Helloworld'. There are no compilation or runtime errors. The program will successfully execute and output the string.