SlideShare a Scribd company logo
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 Principles
Sujit Majety
 
Java annotations
Java annotationsJava annotations
Java annotations
FAROOK Samath
 
C keywords and identifiers
C keywords and identifiersC keywords and identifiers
C keywords and identifiers
Akhileshwar Reddy Ankireddy
 
Concepts of core java
Concepts of core javaConcepts of core java
Concepts of core java
AkshitaMangrulkar
 
Identifier
IdentifierIdentifier
Identifier
ASHUTOSH TRIVEDI
 
Overview of java Language-3.pdf
Overview of java Language-3.pdfOverview of java Language-3.pdf
Overview of java Language-3.pdf
kumari36
 
cs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptxcs213Lecture_1 java programming oopsss.pptx
cs213Lecture_1 java programming oopsss.pptx
mshanajoel6
 
OOAD.pptx
OOAD.pptxOOAD.pptx
OOAD.pptx
Kaviya452563
 
Java (1).ppt seminar topics engineering
Java (1).ppt  seminar topics engineeringJava (1).ppt  seminar topics engineering
Java (1).ppt seminar topics engineering
4MU21CS023
 
UNIT1Lesson 2.pptx
UNIT1Lesson 2.pptxUNIT1Lesson 2.pptx
UNIT1Lesson 2.pptx
CheriviralaNikhil
 
Presentation 1 for school (1).pptx
Presentation 1 for school (1).pptxPresentation 1 for school (1).pptx
Presentation 1 for school (1).pptx
SITAKANTABEHERA3
 
Data types in Java
Data types in JavaData types in Java
Data types in Java
Play Store
 
JAVA PROGRAMMING
JAVA PROGRAMMINGJAVA 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#
Dr.Neeraj Kumar Pandey
 
java handout.doc
java handout.docjava handout.doc
java handout.doc
SOMOSCO1
 
Keyword Presentation
Keyword PresentationKeyword Presentation
Keyword Presentation
Satyamevjayte Haxor
 
Data Types, Variables, and Operators
Data Types, Variables, and OperatorsData Types, Variables, and Operators
Data Types, Variables, and Operators
Marwa Ali Eissa
 
python_Yawar_Rasul.pptx
python_Yawar_Rasul.pptxpython_Yawar_Rasul.pptx
python_Yawar_Rasul.pptx
GetWebb
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
Mufaddal Nullwala
 
Typescript
TypescriptTypescript
Typescript
Nikhil Thomas
 

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

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 

Recently uploaded (20)

A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 

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