A masterful ICSE computer application tutorial part-2 (Tokens in java)
for more java programshttps://wordpress-343193-1101484.cloudwaysapps.com/array
In this tutorial, you will learn about Tokens.
A token is a building block of java. It is the smallest unit of information that can be stored in java. Basically, when you are writing a java program everything that you use is a token.
for more java programs
Array in JAVA
There are many types of tokens in java. They are as follows.
- Keywords
- Identifiers
- Literals/constants
- Operators
- Separators/punctuators
Let's see how all these tokens are used while writing a java program.
Keywords:-
These are the words that are known to the java compiler. It means that they all have some special meaning that the java compiler already know.
There are many keywords in java. Because they all have some special meaning they can't be used as an identifier. Some examples of keywords are void, public, int, static.
2. Identifiers:-
Identifiers are names given to the parts of a java program. They are used to identify a class, a variable, a function or any other part of a java program.
There are some rules to use an identifier. They are as follows.
1. A keyword can't be used as an identifier.
2. The length of the identifier can be any thing.
3 It can't start with a digit.
4. Only _(underscore) and $ (dollar)sign can be used in an identifier.
3. Literals:-
They are constants that are used in a java program. Constant is something that's value does not change throughout the execution of a program. There are many types of constants in java. A non numerical literal and numeric literal, Boolean literal.
4. Operators:-
They are the symbols that are used to perform a particular task on the operands. There are a lot of operators in java. They are as follows.
Bit wise Operators
Arithmetic operators
Logical Operators
Relational operators
Conditional operator
5.Separators/ Punctuators:-
These are symbols used to group or sepaeate a java code. examples are ( ),{} ,[], •,; ,:.
For videos related to java programming
http://www.youtube.com/user/trushnatej
Related Posts
Continue learning with these related articles
Sum of First n Natural Numbers in Java (Loop and Formula)
Find the sum of the first n natural numbers in Java with a for loop, a while loop and the formula n(n + 1)/2, with a dry run and the sums of even numbers, odd numbers, squares and cubes.
Prime Number Program in Java: Check a Number and Print Primes in a Range
Check whether a number is prime in Java by counting its factors, a faster square-root method with isPrime(), and a program that prints all prime numbers in a range.

Encapsulation, Access Specifiers and Scope of Variables in Java for ICSE Class 10
ICSE Class 10 Computer Applications notes on encapsulation: private, default, protected and public access, data hiding with getter and setter methods, instance vs static (class) variables, local variables and scope, with a solved BankAccount program.