Introduction to Java

Introduction to Java

Introduction to Java including simple Java Program, Blue J, Starting and writing rograms on BLue J environment, the method main()

1 / 10

Which of the following is true about Java?

2 / 10

What is BlueJ?

3 / 10

In BlueJ, where can you write and test Java programs?

4 / 10

Which of the following is required to create a Java class in BlueJ?

5 / 10

After writing a program in BlueJ, what must you do before executing it?

6 / 10

What is the purpose of the main() method in Java?

7 / 10

What is the correct signature of the main() method in Java?

8 / 10

Which keyword in the main() method allows it to run without creating an object of the class?

9 / 10

What will the following program print?

public class HelloWorld {
public static void main(String[] args) {
System.out.println(“Hello, World!”);
}
}

10 / 10

In the code below, what will System.out.println(a + b); output?

public class Addition {
public static void main(String[] args) {
int a = 5;
int b = 10;
System.out.println(a + b);
}
}

Your score is

The average score is 0%

Scroll to Top