TOKENS
Tokens:
- Tokens are it is a small part of the program.
- There are four types of tokens.
- Keywords
- Identifiers
- Literals
- Separators
- Keywords means the word having predefined meaning.
- It is also known as compile aware words.
- In Java totally we have 53 keywords
- eg. Class, Static, void, public etc.
- Keywords always must be in lowercase
- The name given by the programmer is called as identifire
- eg. ClassName etc.
- Rules for identifier :-
- Identifier cannot start with the numbers.
- We cannot have space in between identifier.
- We cannot write all special characters except "_" and "$".
- The value given by the programmer is known as literals.
- There are four type of literals we have :
- Number:
4) Separators:
- Separators are used to separate the Java member.
- There are five different type of separators we have in the java:
0 Comments