Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IPS_Quiz1_Chapter1

Total questions: 15

Worksheet time: 10mins

Name
Class
Date
1.

Given an IntelliJ workspace without any projects, how can you create and run a simple “Hello World” program?

a)

Open a text editor and save a .java file in the workspace

b)

Create a new Java project, add a package, create a class, and run the class

c)

Install a new plugin for running Java applications

d)

Use the command line to compile and run the file outside Eclipse

2.

If you are given source code for a Java class, what is the first step in running it in IntelliJ?

a)

Save the file to any folder on your computer

b)

Open IntelliJ and import or create a project for the code

c)

Double-click the file to execute it

d)

Convert it into bytecode manually before importing

3.

Which of the following is a key difference between Java, Python, and JavaScript?

a)

Java is interpreted, while Python and JavaScript are compiled

b)

Python is typically slower but easier to learn than Java

c)

JavaScript is strongly typed, unlike Java

d)

Java cannot be used on multiple platforms

4.

Which is an example of a web application you can build with Java?

a)

A servlet-based application running on Tomcat

b)

A machine learning model in TensorFlow

c)

A mobile app for iOS using Swift

d)

A C++-based desktop game

5.

What role does the JVM play in running a Java program?

a)

It directly translates Java source code into machine code

b)

It stores compiled programs permanently

c)

It executes Java bytecode on any platform

d)

It is used only for debugging Java applications

6.

Java’s “write once, run anywhere” principle is possible because:

a)

Source code is identical on every computer

b)

Bytecode can run on any JVM implementation

c)

Java uses the same compiler on all platforms

d)

Java applications never need recompilation

7.

What is one major benefit of using IntelliJ instead of a plain text editor?

a)

IntelliJ automatically writes code for you

b)

IntelliJ has built-in compiling, debugging, and project management

c)

IntelliJ runs faster than any other IDE

d)

IntelliJ can only be used for Java

8.

Why don’t you need to compile Java source code manually before running it in IntelliJ?

a)

IntelliJ runs the code as plain text

b)

IntelliJ automatically compiles the code in the background

c)

IntelliJ translates Java directly into machine code

d)

Java does not require compilation

9.

JRE stands for

a)

Java Run Environment

b)

Java Run Execution

c)

Java Runtime Environment

d)

Java Ready Execution

10.

Java program does not run without below function

a)

user()

b)

system()

c)

main()

d)

void()

11.

Which of the following is incorrect?

a)

int count = 50.0;

b)

int salary = 50_000;

c)

int salary = 50_00;

d)

all of these are incorrect

12.

Which of these statement is incorrect?

a)

Every class must contain a main() method

b)

Applets do not require a main() method at all

c)

There can be only one main() method in a program

d)

main() method must be made public

13.

Java programs are

a)

Faster than others

b)

Platform independent

c)

Not reusable

d)

Not sacable

14.

Which one of the following is true for java

a)

Java is object oriented and interpreted

b)

Java is efficient and faster than C

c)

Java is the choice of everyone

d)

Java is not robust

15.
What will the output be from the following code?
print(Hello world!)
a)
Hello world!
b)
SyntaxError
c)
Hello world
d)
print(Hello world!)