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