Classof1.com , classofone, class of 1, class of one, classofone.com
Toll free: 1- 877- 252 - 7763 | Fax: 1- 425- 458- 9358

Need help with Computer Science assignment?

Get customized homework help now!

Java Tokens

A token is an individual element in a program. More than one token can appear in a single line separated by white spaces.

Java Tokens:

Keywords, identifiers, operators, Separators, literals.

Java character set: Characters are the smallest unit of java language. These are used to write java tokens. Java characters are defined by Unicode character set.

Keywords:

Keywords are words which belong to java language. They have standard predefined meaning. These words should be used only for their intended purpose. The Keywords should be written in lowercase. Some of the keywords are:

For, do, while, goto, if, else, int, char, byte, switch, void, try, catch, public, protected, private, static, throw, throws.

Identifiers:

Identifiers are names given to classes, methods, variables, objects, arrays, packages and interfaces in a program. These are user defined names.

Rules:

Identifiers are formed with alphabets, digits, underscore and dollar sign characters.

The first character must be an alphabet.

They can be any length.

They are case sensitive.

Literals:

Literals are names that represent constant values. A   constant is a quantity that does not change during program execution. There are five types of literals. They are

  • Integer literals
  • Floating point literals
  • Character literals
  • String literals
  • Boolean literals

Operators:

An operator is a symbol which represents some operation that can be performed on data. There are eight operators in java. They are   

Arithmetic operators, Relational operators, Logical operators, Short hand assignment operators, Increment and decrement operators, Conditional operator, Bitwise operators, special operators.

Separators:

Separators are symbols which belong to java language. These are used to indicate where group of codes are divided and arranged. There are six operators available. They are

  • ( ) Parenthesis – used to enclose arguments
  • { } braces – used to enclose block of codes.
  • [ ] bracksets – used in arrays
  • ; Semicolon – used to separate statements
  • , comma – used separate variables in declaration.
  • . Period – used to separate package names from sub-packages and classes.

Search Our Solution Library for Sample Solutions in:
Java Tokens

You can also visit our Computer science homework help page and upload your question to get customized online homework-help in Java tokens

Computer Science Homework Help
Name* :
Email* :
Country* :
Phone* :
Subject* :
Upload Homework :
Upload another homework (upto 5 uploads max.)
Due Date*
Time
AM/PM
Timezone
Type Your Questions OR Instructions Below
(Type Security Code - case sensitive)
Note: We will not do your assignment for you. We will only help you understand the steps to solve it.