1(xi)
Which of the following is not a type of token in Java?
| 1. Method | 3. Literal |
| 2. Identifier | 4. Keyword |
- (a)only 1
- (b)1 and 3
- (c)only 2
- (d)only 4
Show SolutionHide Solution↓
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.