Study
and learn Java MCQ questions and answers on Basics and Invention history.
Attend job interviews easily with these MCQs.
Go
through Java
Basic Theory Notes before
studying these questions.
1) What does JVM stands for?
A) Java
Variable Machine
B) Java
Virtual Machine
C) Java
Virtual Mechanism
D) None of
the above
Answer [=]
B
Explanation:
JRE Software creates JVM in the PC.
JVM is implemented differently on different machines and hardware so that the
Byte Code present in the Class file produces the same output.
2) What is JVM ?
A) JVM is
the confined memory area
B) All java
programs run inside JVM memory
C) JVM
provides security to the computer by giving controlled access to Files and
Memory on a computer
D) All the
above
Answer [=]
D
3) When was first Version of Java i.e Java 1.0 was
released?
A) 1991
B) 1994
C) 1996
D) 1999
Answer [=]
C
4) What is Portability offered by Java language?
A) Small
code size easy to carry occupying less disk space
B)
Generating suitable Byte Code for each machine by the Compiler
C) Ability
to run the Byte on different machines producing the same behaviour and output
D) Java does
not actually provide portability
Answer [=]
C
5) What is JIT in Java?
A) Java In
Timer
B) Java In
Time Thread
C) Just In
Time Compiler
D) Just In
Time Runnable
Answer [=]
C
6) Choose the correct statement about Java?
A) JIT
Compiler produces Byte Code from Java file.
B) JIT
Compiler takes chunks of Byte Code as input and produces Executable code on
that particular machine.
C) JIT
Compiler assists the actual JAVAC compiler to compile fast
D) None of
the above
Answer [=]
B
7) What happens in the absence of JIT Compiler in
Java?
A) Byte code
is produced slowly
B)
Executable Code is produced slowly because of line by line Interpreting
C)
Executable Code is produced without portability
D) None of
the above
Answer [=]
B
8) What are the main Distribution types of Java
Software?
A) Java SE
(Java Standard Edition)
B) Java EE
(Java Enterprise Edition)
C) Java ME
(Java Micro Edition)
D) All the
above
Answer [=]
D
9) What is the Java distribution type used to build
Web Apps in Java?
A) Java SE
B) Java EE
C) Java ME
D) Java
Embedded
Answer [=]
B
Explanation:
Java SE is
used to build standalone apps with GUI. AWT and Swings are used mainly.
Java ME is used on Embedded Chips
like IOT devices, Vending Machines, Set Top Boxes, ATMs and all.
10) What is LTS mentioned along with Java Version
names like Java SE 11 LTS?
A) LTS
stands for Long Term Support
B) LTS
Versions are patched for security vulnerabilities for up to 5 Years from the
release date.
C) Java SE 8
LTS (supported up to March 2022) and Java SE 11 LTS (supported up to
September 2023) are available as of now.
D) All the
above
Answer [=]
D
11) What is Ahead of Time Compiler in Java?
A) Ahead of
time compiler compiles java files as and when you type and save.
B) Ahead of
time compiler turns byte code to executable code line by line based on
requirement
C) Ahead of
time compiler is a replacement for JIT compiler to translate all byte code to a
single executable file or code to run the program fast and efficient.
D) None of
the above
Answer [=]
C
12) What is the Java command used to compile a java
program from Command Line or Command Prompt or CMD?
A)
>java
hello.java
B)
>javac
hello.java
C)
>javacomp
hello.java
D)
>javacmd
hello.java
Answer [=]
B
13) What is the command used to Run a Java program
form Command Line or Command Prompt or CMD?
A)
javac
hello
B)
java
hello.class
C)
java
hello
D)
java
hello.java
Answer [=]
C
Explanation:
"java" command expects
only a Class Name without the file name extension like .class.
14) What is a Java Editor?
A) Java
editor is simply an IDE like Notepad to type or edit java programs. It does not
have ability Compiling or Running java programs without installing
separate Java Packages on the PC.
B) Java
editor is like Eclipse IDE that has shortcut options or buttons to compile and
run java programs without using CMD or Command Line.
C) Java IDE
searches for the installed Java location for JAVAC, JAVA and JAWAH to compile
and run programs for you.
D) All the
above
Answer [=]
D
0 Comments