SlideShare une entreprise Scribd logo
1  sur  5
JAVA TOKENS
A Smallest individual units in a program are known as tokens
Java Language includes five types of tokens they are:
•Reserved Keyword
•Identifiers
•Literals
•Operators
•Separators
Keyword:
Keywords are an essential part of a language
definitions. These Keywords combined with operators and
separators. All Keywords are written in lower-case letters. Java
is case-sensitive.
Identifiers:
Identifiers are programmer-designed token. They are used
for naming classes, methods,variables,objects, labels,package and
interface in a program.
Rules of Identifiers:
They can have alphabets, digits and the underscore and dollar
sign characters.
They must not being with a digit.
Uppercase and lowercase letters are distinct.
They can be of any length.
Literals:
Literals in java are a sequence of characters ( digits, letters,
and other characters) that represent constant values to be stored in
variables.
Java language specifies five major types of literals they are:
Integer literals
Floating_point literals
Character literals
String literals
Boolean literals
Operators:
An Operator is a symbol that takes one or more arguments
and operators.
Separators:
Separators are symbols used to indicate where groups of
code are divided and arranged.
Lists of separators:
Parentheses (): It is used to call the functions and parsing the
parameters.
braces {}: The curly braces denote the starting and ending of a code.
brackets[]: Used to declare array types and for dereferencing array
values.
Semicolon: Used to separate statements.
Comma: It is used to separate two values, statements, and
parameters.
Period: It separates the package name form the sub-packages and
class. It also separates a variable or method from a reference variable.
THANK YOU

Contenu connexe

Tendances

String and string buffer
String and string bufferString and string buffer
String and string buffer
kamal kotecha
 
Character stream classes introd .51
Character stream classes introd  .51Character stream classes introd  .51
Character stream classes introd .51
myrajendra
 

Tendances (20)

Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Data types
Data typesData types
Data types
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
Files in java
Files in javaFiles in java
Files in java
 
Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 
Java interfaces
Java interfacesJava interfaces
Java interfaces
 
Inner classes in java
Inner classes in javaInner classes in java
Inner classes in java
 
String and string buffer
String and string bufferString and string buffer
String and string buffer
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 
Java Tokens
Java  TokensJava  Tokens
Java Tokens
 
Interfaces in java
Interfaces in javaInterfaces in java
Interfaces in java
 
Core java concepts
Core java  conceptsCore java  concepts
Core java concepts
 
Character stream classes introd .51
Character stream classes introd  .51Character stream classes introd  .51
Character stream classes introd .51
 
Java Programming for Designers
Java Programming for DesignersJava Programming for Designers
Java Programming for Designers
 
Java program structure
Java program structureJava program structure
Java program structure
 
Data types in c++
Data types in c++Data types in c++
Data types in c++
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Java Beans
Java BeansJava Beans
Java Beans
 

Similaire à Java tokens

Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdf
kumari36
 
Introduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesIntroduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologies
TabassumMaktum
 

Similaire à Java tokens (20)

Tokens in C++
Tokens in C++Tokens in C++
Tokens in C++
 
CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf
CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdfCHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf
CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdf
 
Keyword Presentation
Keyword PresentationKeyword Presentation
Keyword Presentation
 
Java unit 2
Java unit 2Java unit 2
Java unit 2
 
Step 4: Start With The Basics
Step 4: Start With The BasicsStep 4: Start With The Basics
Step 4: Start With The Basics
 
OOP Poster Presentation
OOP Poster PresentationOOP Poster Presentation
OOP Poster Presentation
 
7. name binding and scopes
7. name binding and scopes7. name binding and scopes
7. name binding and scopes
 
Introduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologiesIntroduction to Java Object Oiented Concepts and Basic terminologies
Introduction to Java Object Oiented Concepts and Basic terminologies
 
Lexical Analysis.pdf
Lexical Analysis.pdfLexical Analysis.pdf
Lexical Analysis.pdf
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Concepts of core java
Concepts of core javaConcepts of core java
Concepts of core java
 
Compiler Design
Compiler Design Compiler Design
Compiler Design
 
Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++
 
C keywords and identifiers
C keywords and identifiersC keywords and identifiers
C keywords and identifiers
 
Role-of-lexical-analysis
Role-of-lexical-analysisRole-of-lexical-analysis
Role-of-lexical-analysis
 
Java_Roadmap.pptx
Java_Roadmap.pptxJava_Roadmap.pptx
Java_Roadmap.pptx
 
Presentation 1 for school (1).pptx
Presentation 1 for school (1).pptxPresentation 1 for school (1).pptx
Presentation 1 for school (1).pptx
 
11700220036.pdf
11700220036.pdf11700220036.pdf
11700220036.pdf
 

Plus de shalinikarunakaran1 (12)

Data Communication and Networking ( Guided and Unguided Media)
Data Communication and Networking ( Guided and Unguided Media)Data Communication and Networking ( Guided and Unguided Media)
Data Communication and Networking ( Guided and Unguided Media)
 
Character generation
Character generationCharacter generation
Character generation
 
Character attributes
Character attributesCharacter attributes
Character attributes
 
Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)Attributes of output primitives( curve attributes & area fill attributes)
Attributes of output primitives( curve attributes & area fill attributes)
 
Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)Attributes of output primitive(line attributes)
Attributes of output primitive(line attributes)
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Introduction , surveuy on cg
Introduction , surveuy on cgIntroduction , surveuy on cg
Introduction , surveuy on cg
 
Simple java program
Simple java programSimple java program
Simple java program
 
How java differs from c and c++
How java differs from c and c++How java differs from c and c++
How java differs from c and c++
 
JAVA HISTORY
JAVA HISTORYJAVA HISTORY
JAVA HISTORY
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
 

Dernier

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Dernier (20)

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Java tokens

  • 2. A Smallest individual units in a program are known as tokens Java Language includes five types of tokens they are: •Reserved Keyword •Identifiers •Literals •Operators •Separators Keyword: Keywords are an essential part of a language definitions. These Keywords combined with operators and separators. All Keywords are written in lower-case letters. Java is case-sensitive.
  • 3. Identifiers: Identifiers are programmer-designed token. They are used for naming classes, methods,variables,objects, labels,package and interface in a program. Rules of Identifiers: They can have alphabets, digits and the underscore and dollar sign characters. They must not being with a digit. Uppercase and lowercase letters are distinct. They can be of any length. Literals: Literals in java are a sequence of characters ( digits, letters, and other characters) that represent constant values to be stored in variables. Java language specifies five major types of literals they are: Integer literals Floating_point literals Character literals String literals Boolean literals
  • 4. Operators: An Operator is a symbol that takes one or more arguments and operators. Separators: Separators are symbols used to indicate where groups of code are divided and arranged. Lists of separators: Parentheses (): It is used to call the functions and parsing the parameters. braces {}: The curly braces denote the starting and ending of a code. brackets[]: Used to declare array types and for dereferencing array values. Semicolon: Used to separate statements. Comma: It is used to separate two values, statements, and parameters. Period: It separates the package name form the sub-packages and class. It also separates a variable or method from a reference variable.