Skip to main content

JAVA: Tokens.

JAVA.

            A programming language is designed to process certain kind of data consisting of a number, character and strings which is used to provide useful output known as information.

The task of processing data is done by executing a sequence of information constituting a program.
             
            These instructions are formed using certain symbols and words according to some strict rules known as syntax rules. Java has its own set of rules.

TOKENS

            Each individual units uses in the language is given by a term token. Java program are written using tokens.

There are various types of tokens.
  1. Identifier.
  2. Keywords.
  3. Constants.
  4. Datatypes.
  5. Variables.
  6. Separator.
  7. Operator.

01. Identifier.
                They are user defined name that consist of sequence of letters and digits. Read more...
Example:
                acc_no;
                name
                no_5
                BALANCE


02. KEYWORDS.
                Keywords are also known as Reserved words.There are around 50 keywords. By the name itself we can indicate all the words has special operation and it has a fixed meaning. Read more...

Example:
                import.
                boolean.
                final.


03. CONSTANT.
            Any fixed valve which does not change during the execution are known as constants.  Read more...

Syntax:
            final datatype name= value.

Example:
            final double pi=3.142


04. DATATYPES.
                Datatypes says what type of valve a variable can take and it also sets the size. Java is very rich in Datatypes.  Read more...

Example:
                int.
                char.
                string.


05. VARIABLE.
                It is user defined. Identifier are also known as variables. A variable is named as the memory location. Read more...

Syntax:
                datatypes variable=size;

Example:
                int a=4;


06. SEPARATOR.
                They are also known as Punctuation. They are the special characters in java which are used to separate the variable or character. Read more...

Example:
                comma - ,
                Braces - ()
                Semicolon - ;


07. OPERATOR.
                A Operator is a symbol that tells the computer to perform a certain mathematical operation or logical manipulation. There are 8 types of operator.

Example:
                + (addition)
                > (grater than)
                ! (logical NOT)



Check out the interesting history of Java.

The important features of java.

The structure of java.

The environment of java.

Also the complete process to execute java program.

Comments