Join our Telegram Channel

Core Java Multiple Choice Questions(MCQs) and Answers

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]
GkSeries apsc prelims 2023 test series
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]


GkSeries Android App

Today's Top Current Affairs

Current Affairs MCQs

State-wise Current Affairs

General Knowledge

Month-wise Current Affairs 2022

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test