Core Java Multiple Choice Questions(MCQs) and Answers

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]
Advertisement
Article and Schedule Quiz Start Test!

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

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]

ADRE 2.0 FULL LENGTH MOCK TEST

Take Mock Tests

Missiles Mock Test Start Test!
SSC MTS Mock Test Start Test
IBPS CLERK MOCK TEST Start Test
SSC MTS 2022 JULY 26 Shift 1 (ENGLISH) Start Test!
SSC GD Previous Year Paper 2021 Nov 17 Shift - I (Hindi) Start Test!
SSC CGL Tier - 1 PYP 2022 April 21 Shift- 1 (ENGLISH) Start Test!
MPSC PAPER I MOCK TEST 1 (ENGLISH) Start Test!
IB Security Assistant Mock test 1 (english) Start Test!
UP POLICE CONSTABLE MOCK TEST 1 Start Test!
DELHI POLICE CONSTABLE MOCK TEST 1 (HINDI) Start Test!

Chapters

Advertisement
Assam Direct Recruitment Test Series