Core Java Multiple Choice Questions and Answers for Interview | Quiz MCQs

Questions
1 The new operator
A returns a pointer to a variable
B creates a variable called new
C obtains memory for a new variable
D tells how much memory is available

Answer: Option [C]
2 Which of the following statement is correct?
A For positive numbers, result of operators >> and >>> are same
B Java provides two operators to do left shift <<< and <<
C >> is the zero fill right shift operator
D >>> is the signed right shift operator

Answer: Option [A]
3 Java language has support for which of the following types of comment ?
A block, line and javadoc
B javadoc, literal and string
C javadoc, char and string
D single, multiple and quote

Answer: Option [A]

Java supports three types of comments.

(i)Single line i.e. line e.g. //comment

(ii)Multi line i.e. block e.g. /*comment*/

(iii)Javadoc comments e.g. /**comment*/

4 Command to execute a compiled java program is :
A javac
B java
C run
D execute

Answer: Option [B]
5 The java compiler
A creates executable
B translates java source code to byte code
C creates classes
D produces java Interpreter

Answer: Option [B]

Chapters

Useful Computer Science EBooks

Random GK Questions

A Business to Corporate
B Business to Consumer
C Business to Companies
D Business to Countries
Answer: Option [B]
A Lion-tailed Macaque, Blue Bull, Hanuman Langur and cheetal
B Snow Leopard, Swamp Deer, Rhesus monkey and saras
C Kashmir stag, Cheetal, Blue bull and Great Indian Bustard
D Great Indian Bustard, Musk Deer, Red Panda and Asiatic Wild Ass
Answer: Option [D]
A Tropical Sub-humid Forests
B Tropical Humid Forests
C Tropical Rain Forest
D Tropical Dry Forest
Answer: Option [A]
A seismograph
B quake meter
C barometer
D none of the above
Answer: Option [A]
A Lymphocytes
B Monocytes
C Arithrocytus
D Blood platelets
Answer: Option [A]
A Cotton
B Sugarcane
C Tea
D Jute
Answer: Option [D]