Computer Applications

Which of the following is not a type of token in Java?

1. Method3. Literal
2. Identifier4. Keyword
  1. only 1
  2. 1 and 3
  3. only 2
  4. 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