Java MCQ : Literals in Java (Multiple Choice Questions)


Question 1
What is Literal in Java Programming ?
A
special type of class
B
None of these
C
special type of data type
D
source code representation of a fixed value
Question 2
It is possible to assign a literal to a variable of a primitive type.
A
True Statement
B
False Statement
Question 3
boolean result = true;
Which type of literal is assigned to the variable "result" ?
A
string
B
char
C
boolean
D
bool
Question 4
Which type of literal is written in pair of single quote ?
A
Float
B
Boolean
C
Character
D
Integer
Question 5
An integer literal is of type long if and only if it has suffix - __________ in Java Programming.
A
L
B
D
C
F
D
O
There are 5 questions to complete.