SlideShare a Scribd company logo
1 of 11
Download to read offline
BLUE J
CHP- 3
VALUE & DATA TYPES
LECTURE 1
PRESENTED BY MD ARBAZ KHAN
ENGLISH
Character
Word
sentences
Paragraph
Code/language
Java
Character
Tokens
Statement
Method/function
Code/language
Value & Data Types
TOKENS
A token is the smallest elements of a program.
The different types of token in java are :-
1. Keyword
2. Indentifiers
3. Literals
4. Operators
5. Seperators
KEYWORDS
• Keywords is also known as Reserved words. These are predefined words by Java so they
cannot be used as a variable or object name or class name.
• Ex- int
for
Double
If
else
class
IDENTIFIERS
Identifiers in Java are symbolic names used for identification. They can be a class name, variable
name, method name, package name, constant name.
Rules:-
1. Indentifiers is the name assigned to an elements in a program
Examples: classes, variables, function, object & data member.
I. Identifiers may contain an alphabets, digit and two special symbols ($) & (_).
II. The first character of an indentifiers can only contain alphabet (a-z) (a-z).
III. No blanks spaces b/w the indentifiers.
IV. An identifier should not contain a number at the starting
SIMPLE JAVA PROGRAM
1.HelloJava (Class name)
2.main (main method)
3.String (Predefined Class name)
4.args (String variables)
5.System (Predefined class)
6.out (Variable name)
7.println (method)
EXAMPLES OF INVALID INDENTIFIER
Invalid identifiers:
Below are some examples of invalid identifiers:
•Test Variable ( We can not include a space in an identifier)
•123javatpoint ( The identifier should not begin with numbers)
•java+tpoint ( The plus (+) symbol cannot be used)
•a-javatpoint ( Hyphen symbol is not allowed)
•java_&_Tpoint ( ampersand symbol is not allowed)
•Java'tpoint (we can not use an apostrophe symbol in an identifier)
CASE 1-
SPACE IN WORDS
CASE 2-
FIRST LETTER IS NUMBER
CASE 3-
FIRST LETTER IS NOT A
DOLLAR OR UNDERSCORE
EXAMPLES OF VALID IDENTIFIER IN JAVA:
•TestVariable
•testvariable
•a
•i
•Test_Variable
•_testvariable
•$testvariable
•sum_of_array
•TESTVARIABLE
•jtp123
•JavaTpoint
•Javatpoint123
CASE 1- USE OF WORDS,
UNDERSCORE & NUMBER
CASE 2- NO SPACE B/W
DOLLAR AND WORD
CASE 3- WORDS WITHOUT
SPCE
TO BE CONTINUE….

More Related Content

Similar to CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf

Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented PrinciplesSujit Majety
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdfkumari36
 
cs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptxcs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptxmshanajoel6
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering4MU21CS023
 
Presentation 1 for school (1).pptx
Presentation 1 for school (1).pptxPresentation 1 for school (1).pptx
Presentation 1 for school (1).pptxSITAKANTABEHERA3
 
Data types in Java
Data types in JavaData types in Java
Data types in JavaPlay Store
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#Dr.Neeraj Kumar Pandey
 
java handout.doc
java handout.docjava handout.doc
java handout.docSOMOSCO1
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and OperatorsMarwa Ali Eissa
 
python_Yawar_Rasul.pptx
python_Yawar_Rasul.pptxpython_Yawar_Rasul.pptx
python_Yawar_Rasul.pptxGetWebb
 

Similar to CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf (20)

Object Oriented Principles
Object Oriented PrinciplesObject Oriented Principles
Object Oriented Principles
 
Java annotations
Java annotationsJava annotations
Java annotations
 
C keywords and identifiers
C keywords and identifiersC keywords and identifiers
C keywords and identifiers
 
Concepts of core java
Concepts of core javaConcepts of core java
Concepts of core java
 
Identifier
IdentifierIdentifier
Identifier
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdf
 
cs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptxcs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptx
 
OOAD.pptx
OOAD.pptxOOAD.pptx
OOAD.pptx
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering
 
UNIT1Lesson 2.pptx
UNIT1Lesson 2.pptxUNIT1Lesson 2.pptx
UNIT1Lesson 2.pptx
 
Presentation 1 for school (1).pptx
Presentation 1 for school (1).pptxPresentation 1 for school (1).pptx
Presentation 1 for school (1).pptx
 
Data types in Java
Data types in JavaData types in Java
Data types in Java
 
JAVA PROGRAMMING
JAVA PROGRAMMINGJAVA PROGRAMMING
JAVA PROGRAMMING
 
C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#C# lecture 2: Literals , Variables and Data Types in C#
C# lecture 2: Literals , Variables and Data Types in C#
 
java handout.doc
java handout.docjava handout.doc
java handout.doc
 
Keyword Presentation
Keyword PresentationKeyword Presentation
Keyword Presentation
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
 
python_Yawar_Rasul.pptx
python_Yawar_Rasul.pptxpython_Yawar_Rasul.pptx
python_Yawar_Rasul.pptx
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
Typescript
TypescriptTypescript
Typescript
 

Recently uploaded

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
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.pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
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
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

CHAPTER 3 - VALUE AND DATA TYPES LECTURE 1.pdf

  • 1. BLUE J CHP- 3 VALUE & DATA TYPES LECTURE 1 PRESENTED BY MD ARBAZ KHAN
  • 3. TOKENS A token is the smallest elements of a program. The different types of token in java are :- 1. Keyword 2. Indentifiers 3. Literals 4. Operators 5. Seperators
  • 4. KEYWORDS • Keywords is also known as Reserved words. These are predefined words by Java so they cannot be used as a variable or object name or class name. • Ex- int for Double If else class
  • 5. IDENTIFIERS Identifiers in Java are symbolic names used for identification. They can be a class name, variable name, method name, package name, constant name. Rules:- 1. Indentifiers is the name assigned to an elements in a program Examples: classes, variables, function, object & data member. I. Identifiers may contain an alphabets, digit and two special symbols ($) & (_). II. The first character of an indentifiers can only contain alphabet (a-z) (a-z). III. No blanks spaces b/w the indentifiers. IV. An identifier should not contain a number at the starting
  • 6. SIMPLE JAVA PROGRAM 1.HelloJava (Class name) 2.main (main method) 3.String (Predefined Class name) 4.args (String variables) 5.System (Predefined class) 6.out (Variable name) 7.println (method)
  • 7. EXAMPLES OF INVALID INDENTIFIER Invalid identifiers: Below are some examples of invalid identifiers: •Test Variable ( We can not include a space in an identifier) •123javatpoint ( The identifier should not begin with numbers) •java+tpoint ( The plus (+) symbol cannot be used) •a-javatpoint ( Hyphen symbol is not allowed) •java_&_Tpoint ( ampersand symbol is not allowed) •Java'tpoint (we can not use an apostrophe symbol in an identifier)
  • 8. CASE 1- SPACE IN WORDS CASE 2- FIRST LETTER IS NUMBER CASE 3- FIRST LETTER IS NOT A DOLLAR OR UNDERSCORE
  • 9. EXAMPLES OF VALID IDENTIFIER IN JAVA: •TestVariable •testvariable •a •i •Test_Variable •_testvariable •$testvariable •sum_of_array •TESTVARIABLE •jtp123 •JavaTpoint •Javatpoint123
  • 10. CASE 1- USE OF WORDS, UNDERSCORE & NUMBER CASE 2- NO SPACE B/W DOLLAR AND WORD CASE 3- WORDS WITHOUT SPCE