Computer Applications
Which of the following is not a type of token in Java?
| 1. Method | 3. Literal |
| 2. Identifier | 4. Keyword |
- only 1
- 1 and 3
- only 2
- only 4
Values & Data Types Java
7 Likes
Answer
only 1
Reason — In Java, the main types of tokens are keywords, identifiers, literals, operators, and separators. A method is not considered a token; it is a block of code that performs a task.
Answered By
3 Likes
Related Questions
Which of the following access specifiers will make a member accessible only within its own class?
- public
- private
- protected
- default
What will be the output of the following Java method?
Character.isLetterOrDigit('\n')- 1
- 0
- true
- false
The statement given below is termed as:
public void Accept(int a)- Method signature
- Method block
- Method prototype
- Constructor
What is the output of the following Java code?
boolean flag = false; if (flag) { System.out.println("True"); } else { System.out.println("False"); }- True
- False
- No output
- Compilation error