0% found this document useful (0 votes)
22 views4 pages

Concept of Data Types

The document discusses different types of tokens in a Java program including literals, identifiers, variables, and primitive and non-primitive data types. Literals include integer, real, character, string, boolean, and null literals. Identifiers symbolically represent classes, methods, and variables. Variables are named memory locations that can change value. Primitive types are basic data types that are independent of other types, including numeric and non-numeric types. Non-primitive types are derived from primitive types.

Uploaded by

saikarki24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views4 pages

Concept of Data Types

The document discusses different types of tokens in a Java program including literals, identifiers, variables, and primitive and non-primitive data types. Literals include integer, real, character, string, boolean, and null literals. Identifiers symbolically represent classes, methods, and variables. Variables are named memory locations that can change value. Primitive types are basic data types that are independent of other types, including numeric and non-numeric types. Non-primitive types are derived from primitive types.

Uploaded by

saikarki24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

.CONCEPT OF DATA TYPES.

TOKENS
Every single component present in the java program is
called as a TOKEN.
TYPES OF TOKENS
1. LITERALS
Literals are the constants used in a java program.
And it remains constant throughout the
discussion.
 INTEGER LITERALS-Numbers which are
represented without decimal point is called an
integer literal.
 REAL LITERALS-They are also called as floating
point literals. They are represented with a decimal
point.
 CHARACTER LITERALS-The characters which are
alphanumeric in nature, are called character
literals,(‘Computer’) single coats.
 STRING LITERALS-String is a set of alphanumeric
character enclosed with double
coats(“Computer”)are called as string literals.
 BOOLEAN LITERALS-They are special literals. They
represent true or false.
 NULL LITERALS-A null literal is used for special
purpose. It is represented with the word null.
IDENTIFIERS
Identifiers are the symbolic representation by which
a logical structure is identified. It can be a class
name, a method name or a variable name.
VARIABLE
A Variable is a named memory location, which
contains value. The value of a variable can change
depending upon the circumstances and operations in
a program.
PRIMITIVE TYPES
The data types, which are independent of any other
type, are known as primitive data types. They are
also called as BASIC DATA TYPES.
They are also classified into numeric and non-
numeric data types.
ASCII codes
A-Z : 65-90
a-z : 97-122
0-9 : 48-57
PUNCTUATORS
Punctuators are the punctuation signs used as
special characters in a java program.
Eg:(. , , “, ‘)

SEPERATORS
They are the special characters in java, which are
used to separate the variables or the characters.
Eg:(),[],{}.

OPERATORS
Operators are basically the symbols or tokens which
perform arithmetical or logical operations to yield a
meaningful result.
ASSIGNMENTS
Assigning means storing constants in the variables
using ‘=’ symbol.
NON-PRIMITIVE TYPES
Non-Primitive data types are also called Derived data
types. They are directly or indirectly dependent on
Primitive Data Types.
ARITHMETIC EXPRESSION
An expression, which contains variables, constants and
arithmetic operators, is termed as an Arithmetic
Expression.
PURE
Contains same type of data items.
MIXED OR IMPURE
Includes elements of different data types.
TYPE CONVERSION
Converts many operations into a single data type.
 IMPLICT TYPE
The type of conversion takes place automatically into
the higher most data type available.
 EXPLICIT TYPE
Another way of type conversion in this system of
data conversion depends upon the user’s choice or
user’s demand.

You might also like