What is tokens in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is tokens in java?

Anybudy can explain In depth.

16th Apr 2019, 6:34 AM
raghavendra jd
raghavendra jd - avatar
1 Answer
+ 2
Java or JavaScript? Because you're only doing the tutorial of the latter. A token is a small part of your code that your programming language can identify as a unit. For example if you write: x+y ... your language understands that x, + and y are three separate units (tokens) while if you wrote: x_plus_y ... that would be read as one token. If there was this: f(x) ... it would become the tokens f, (, x and ). If instead you wrote: 'f(x)' ... it would be just one token. What's considered a token is different between languages. It is just about how the syntax of the language is defined.
16th Apr 2019, 8:35 AM
HonFu
HonFu - avatar