SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Introduction to java
Introduction to javaIntroduction to java
Introduction to java
 
Java threads
Java threadsJava threads
Java threads
 
Java IO Package and Streams
Java IO Package and StreamsJava IO Package and Streams
Java IO Package and Streams
 
Exception Handling in JAVA
Exception Handling in JAVAException Handling in JAVA
Exception Handling in JAVA
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Final keyword in java
Final keyword in javaFinal keyword in java
Final keyword in java
 
Data Types & Variables in JAVA
Data Types & Variables in JAVAData Types & Variables in JAVA
Data Types & Variables in JAVA
 
Introduction to java (revised)
Introduction to java (revised)Introduction to java (revised)
Introduction to java (revised)
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
java interface and packages
java interface and packagesjava interface and packages
java interface and packages
 
Variable scope in php
Variable scope in phpVariable scope in php
Variable scope in php
 
input/ output in java
input/ output  in javainput/ output  in java
input/ output in java
 
Java I/o streams
Java I/o streamsJava I/o streams
Java I/o streams
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scanner
 
Applets
AppletsApplets
Applets
 
Java constructors
Java constructorsJava constructors
Java constructors
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
Java Data Types
Java Data TypesJava Data Types
Java Data Types
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 

Ähnlich wie Java tokens

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.pdfarbazkhan950274
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdfkumari36
 
Step 4: Start With The Basics
Step 4: Start With The BasicsStep 4: Start With The Basics
Step 4: Start With The BasicsReema
 
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 terminologiesTabassumMaktum
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and OperatorsMarwa Ali Eissa
 
Compiler Design
Compiler Design Compiler Design
Compiler Design waqar ahmed
 
Complete Tokens in c/c++
Complete Tokens in c/c++Complete Tokens in c/c++
Complete Tokens in c/c++Shobi P P
 
Presentation 1 for school (1).pptx
Presentation 1 for school (1).pptxPresentation 1 for school (1).pptx
Presentation 1 for school (1).pptxSITAKANTABEHERA3
 

Ähnlich wie 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
 

Mehr von shalinikarunakaran1

Mehr von shalinikarunakaran1 (13)

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
 
Java program structure
Java program structureJava program structure
Java program structure
 
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
 

Kürzlich hochgeladen

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 

Kürzlich hochgeladen (20)

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 

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.