WorksheetsIPS_Quiz1_Chapter1
Total questions: 15
Worksheet time: 10mins
Given an IntelliJ workspace without any projects, how can you create and run a simple “Hello World” program?
Open a text editor and save a .java file in the workspace
Create a new Java project, add a package, create a class, and run the class
Install a new plugin for running Java applications
Use the command line to compile and run the file outside Eclipse
If you are given source code for a Java class, what is the first step in running it in IntelliJ?
Save the file to any folder on your computer
Open IntelliJ and import or create a project for the code
Double-click the file to execute it
Convert it into bytecode manually before importing
Which of the following is a key difference between Java, Python, and JavaScript?
Java is interpreted, while Python and JavaScript are compiled
Python is typically slower but easier to learn than Java
JavaScript is strongly typed, unlike Java
Java cannot be used on multiple platforms
Which is an example of a web application you can build with Java?
A servlet-based application running on Tomcat
A machine learning model in TensorFlow
A mobile app for iOS using Swift
A C++-based desktop game
What role does the JVM play in running a Java program?
It directly translates Java source code into machine code
It stores compiled programs permanently
It executes Java bytecode on any platform
It is used only for debugging Java applications
Java’s “write once, run anywhere” principle is possible because:
Source code is identical on every computer
Bytecode can run on any JVM implementation
Java uses the same compiler on all platforms
Java applications never need recompilation
What is one major benefit of using IntelliJ instead of a plain text editor?
IntelliJ automatically writes code for you
IntelliJ has built-in compiling, debugging, and project management
IntelliJ runs faster than any other IDE
IntelliJ can only be used for Java
Why don’t you need to compile Java source code manually before running it in IntelliJ?
IntelliJ runs the code as plain text
IntelliJ automatically compiles the code in the background
IntelliJ translates Java directly into machine code
Java does not require compilation
JRE stands for
Java Run Environment
Java Run Execution
Java Runtime Environment
Java Ready Execution
Java program does not run without below function
user()
system()
main()
void()
Which of the following is incorrect?
int count = 50.0;
int salary = 50_000;
int salary = 50_00;
all of these are incorrect
Which of these statement is incorrect?
Every class must contain a main() method
Applets do not require a main() method at all
There can be only one main() method in a program
main() method must be made public
Java programs are
Faster than others
Platform independent
Not reusable
Not sacable
Which one of the following is true for java
Java is object oriented and interpreted
Java is efficient and faster than C
Java is the choice of everyone
Java is not robust
print(Hello world!)
