What is a token and its types?

 



Remember the time when you used parts of speech like verbs, adjectives in your English class! 

 

These are touted as the building blocks or foundation of the English language. There will be no sentence or structure without them. 

 

Tokens in the programming language play a similar type of role. 

 

When we talk about tokens the concepts like bool, int, private and public are often used. 

 

In a programming language the compiler helps in breaking the line of code into similar texts called tokens. These are touted as the smallest element of Java.

 

These java tokens help make a compiling program more powerful and meaningful. 

 

There are several types of token that every program should know in order to use them effectively in a program. 

 

If you want to know about token and its types, stay till the end of this blog post to equip yourself with the right information. 

 

Let’s get started! 

 

 

Tokens - an overview 

 

Tokens are regarded as the foundation or building block of a code script. These tokens include keywords, constants and operators and other stuff that is specific to a particular programming language. 

 

The tokens are mainly identified with the help of delimiters or bytecode. 

 

The delimiters are considered in the form of tabs, spaces, new lines or new-line characters which may not be part of the token but help in identifying them. Whereas, the bytecode is considered as the object code where the interpreter converts the machine code into the code that is understood by the computer system. 

 

Read More


Comments

Popular posts from this blog

What are the 5 types of inheritance?

Remove duplicates from a sorted linked list

How often can you Buy and Sell the same stock?