'Whitespace' in Java language may be?
A space
A new line
A tab
All of the mentioned
View Answer
Correct Answer: D — All of the mentioned
Explanation:
No explanation is available for this question yet.
9 practice sets · Page 1 of 1
'Whitespace' in Java language may be?
A space
A new line
A tab
All of the mentioned
Correct Answer: D — All of the mentioned
Explanation:
No explanation is available for this question yet.
Which of the following is used to name class, method and variables?
Identifiers
Keywords
Both
None of the mentioned
Correct Answer: A — Identifiers
Explanation:
Identifiers are used to name classes, methods and variables.
Which of the following 'Seperator' is most commonly used in Java program?
Parenthesis
Braces
Comma
Semicolon
Correct Answer: D — Semicolon
Explanation:
Semicolon is most commonly used in Java program, which terminates statements.
Which of the following is readable by both Computer and Human?
Single-line comment
Multi-line comment
Documentation comment
All of the mentioned
Correct Answer: C — Documentation comment
Explanation:
Documentation comment is used to produce an HTML file that documents the given program.
What are the types of comments defined by Java?
Single-line comment
Multi-line comment
Documentation comment
All of the mentioned
Correct Answer: D — All of the mentioned
Explanation:
No explanation is available for this question yet.
Which of the following is a Literal Representation?
100
'100'
Sample
None of the mentioned
Correct Answer: A — 100
Explanation:
A constant value in Java is created by using a 'Literal Representation' of it. Integer Literals are not enclosed in quotes where as String Literals are enclosed in quotes.
How many reserved keywords are there in Java language?
50
52
49
45
Correct Answer: A — 50
Explanation:
As of Java 1.5 there are 50 keywords out of which 48 are used(const and goto keywords are unusable keywords).
Which of these is a reserved word in Java Programming Language?
method
native
subclasses
reference
Correct Answer: B — native
Explanation:
"native" is a valid keyword used to modify method declaration. The valid keyword used in Java language for subclassing is "extends" not subclasses.
Which of these is a valid keyword in Java?
interface
string
float
unsigned
Correct Answer: A — interface
Explanation:
"String" and "Float" are class types in Java. "unsigned" is a keyword used in C/C++ but not in Java.