Java Multiple Choice Question with Answer


Hello friends in this article we are going to discuss about Java Multiple Choice Questions with answer | Java Objective Type Questions with Answers | Java Quiz with answer | Java Questions with answers | Java Online Quiz for practise | Java question answer website

1.In a for loop, if the number of statements are greater than one, which of the following needs to be inserted at the beginning and the end of the loop?

ans – French curly braces{}

2.Using Java we can develop,

a Desktop Application
b Web Application
c Both the options
d None of these options

Ans: c

3.The main method in java should,

a. be private static
b be public static
c. return int
d. take boolean[] as argument

Ans: b

4.The break statement cannot be present for_____construct

a. do while
b. for
c.If
d. while

Ans: c

5.JRE comprises of_____ and _____

a JVM ✓
b. API
C. JDK
d tools

Ans: c

6.The____statement causes the program execution to stop and JVM to shut down.

a.exit
b. break
c.return
d.System.exit()

Ans: d

7.A continue statement makes the execution Jump to______

a. the end of the loop
b. the statement just after continue
c. the first statement of the loop
d. the next iteration of the loop

Ans: d

8.State true or false. Java is a structured programming language

Ans – False


9.To compile debug and execute a program written in java______ is required.

a.JDK
b. JRE
c. JVM
d. JIT

Ans: a

10.How was Java initially named?

ans – The Oak

11.What Is Polymorphism?

ans – ability to have many forms

12.French curly braces {} Is a must if the for loop executes more than one statement

ans – True

13.When typing the code in code editor, it fixes the compilation error. It also assists in how to fix that error.

True

14.We can move an already existing project in eclipse to another location by compressing it. This we call as_____the project.

Ans – Exporting

15.In Eclipse, the plugin that is needed for Java Development is______

ans – JDT

16.A project developed on one machine can be included in the current workspace by_____that project.

ANS – Importing

17.Which edition of java is used for developing web application?

ans – J2EE

18.For compiling a java code we have separate compilers for different OS.

ans – false

19._____generates the byte code for a given file with Java extension.

ans – JDK

20.For compiling a java code we have separate compilers for different OS.

ans – False

21.Who executes the byte code in java?

ans – JVM


Leave a Reply

Your email address will not be published. Required fields are marked *