Computer Science, asked by kunalvishnoi2018, 11 months ago

what is the difference between token and block in Java program?

Answers

Answered by monicapawansharmamon
1
Tokens:
Tokens are the various Java program elements which are identified by the compiler. A token is the smallest element of a program that is meaningful to the compiler. ... Java Tokens are the smallest individual building block of a Java program. TheJava compiler uses it for constructing expressions and statements.

Block:
A block in Java is a group of one or more statements enclosed in braces. Ablock begins with an opening brace ({) and ends with a closing brace (}). Between the opening and closing braces, you can code one or more statements. For example: { int i, j; i = 100; j = 200; } A block is itself a type of statement.
Similar questions