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? Java is platform-independent. Java supports object-oriented programming. Java uses automatic memory management (Garbage Collection). All of the above. 2 / 10 What is BlueJ? A type of Java API. An integrated development environment (IDE) for Java programming. A Java library for graphics. A compiler for Java. 3 / 10 In BlueJ, where can you write and test Java programs? Object Bench Class Diagram Editor Window Terminal Window 4 / 10 Which of the following is required to create a Java class in BlueJ? Click on "Project" > "New Project" > Right-click in the class diagram > "New Class". Click on "File" > "Open File". Click on "Run" > "Execute Class". None of the above. 5 / 10 After writing a program in BlueJ, what must you do before executing it? Save the program. Compile the program. Close the editor. None of the above. 6 / 10 What is the purpose of the main() method in Java? It serves as the starting point for program execution. It initializes variables. It handles exceptions. None of the above. 7 / 10 What is the correct signature of the main() method in Java? public static void main() public void main(String args) public static void main(String[] args) void main() 8 / 10 Which keyword in the main() method allows it to run without creating an object of the class? public void static main 9 / 10 What will the following program print? public class HelloWorld { public static void main(String[] args) { System.out.println(“Hello, World!”); } } Hello, World! Hello World Compilation Error Runtime Error 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); } } 5 10 510 15 Compilation Error Your score isThe average score is 0% By WordPress Quiz plugin