Computer Science, asked by Abhishek501, 1 year ago

what is the difference between token and identifier?

Answers

Answered by Riankita
157
. **Identifier is also known as variables. These are the named memory location which are use to store values. 
eg:- int a=9; 
here 'a' is the variable or the identifier. 

** Token is the fundamental unit of java programming.It can be variables, operators, separators, constants etc 

Abhishek501: oh thanks
Riankita: welcome
Answered by anuragkumar1067
39
The first category of token is an Identifier. Identifiers are used by programmers to name things in Java: things such as variables, methods, fields, classes, interfaces, exceptions, packages, etc.

In a Java program, all characters are grouped into symbols called tokens. Larger language features are built from the first five categories of tokens (the sixth kind of token is recognized, but is then discarded by the Java compiler from further processing).
Similar questions