What is a Token?
It is the smallest and basic grouped element in a Java Program is called as Tokens.
The compiler uses these tokens as a symbol to identify the code, and these tokens also help to maintain the syntax of the code.
So following are the list of tokens that are considered:
- Identifiers: Names that the programmer chooses
- Keywords: Predefined Names in the programming language
- Separators (also known as punctuators): Characters used for punctuation and paired-delimiters
- Operators: Symbols that operate on operand and produces results
- Literals (specified by their type)
- Numeric: int and double
- Logical: boolean
- Textual: char and String
- Reference: null
- Comments
|