SlideShare a Scribd company logo
Primitive Data Types 
There are eight primitive data types supported by Java. 
Primitive data types are predefined by the language and 
named by a key word. 
Primitive types are not objects; 
so does not have any methods for further processing.
Non Decimal 
● byte - signed 8-bit 
● short - signed 16-bit 
● int - signed 32-bit 
● long - signed 64-bit
Decimal 
● float - single-precision 32-bit 
● double - double-precision 64-bit
boolean 
● boolean data type represents one bit of information 
● There are only two possible values : true and false. 
● Default value is false
char 
● 16-bit Unicode character 
● Minimum value is ‘u0000′ (or 0). 
● Maximum value is ‘uffff’ (or 65,535 inclusive)
Reference Data Types 
Reference variables are created using defined 
constructors of the classes. 
They are used to access objects. These variables are 
declared to be of a specific type that cannot be changed.
Java Literals 
A literal is a source code representation of a fixed value.
Java language supports few special escape 
sequences for String and char literals as well.

More Related Content

PDF
Java basic data types
PPTX
Java Datatypes
PPTX
Datatype introduction- JAVA
PDF
Java basic datatypes
PPT
Data types
PDF
Data types in Java
PPTX
Java Data Types and Variables
PPTX
Data types IN JAVA
Java basic data types
Java Datatypes
Datatype introduction- JAVA
Java basic datatypes
Data types
Data types in Java
Java Data Types and Variables
Data types IN JAVA

What's hot (20)

PPT
Primitive data types in java
PDF
Handout for Dublin Core Metadata Initiative Abstract Model
PPTX
5. variables & data types
PPTX
Why Java is not a purely object oriented language?
PPTX
L2 datatypes and variables
PPTX
Flow control, variable types
PDF
PDF
0x3E9 Ways To DIE
PPTX
Python assignment help from professional programmers
PPTX
Python revision tour -I
PPTX
C keywords and identifiers
PPT
Primitive data types
PPTX
What are variables and keywords in c++
PDF
Doppl development iteration #2
PPTX
Variables and datatypes in javascript
PPTX
Data Types
PPTX
Data types and Operators
PPTX
Variables in C++, data types in c++
PPTX
Csc240 -lecture_4
PPSX
C – A Programming Language- I
Primitive data types in java
Handout for Dublin Core Metadata Initiative Abstract Model
5. variables & data types
Why Java is not a purely object oriented language?
L2 datatypes and variables
Flow control, variable types
0x3E9 Ways To DIE
Python assignment help from professional programmers
Python revision tour -I
C keywords and identifiers
Primitive data types
What are variables and keywords in c++
Doppl development iteration #2
Variables and datatypes in javascript
Data Types
Data types and Operators
Variables in C++, data types in c++
Csc240 -lecture_4
C – A Programming Language- I
Ad

Viewers also liked (6)

PPTX
Web accessibility
PPTX
Comparison
PDF
Git presentation1
PPTX
Videoconferencing: Connect, Communicate and Collaborate
PPT
Must Know Web 2.0
PPT
Presentation Tools for the Classroom
Web accessibility
Comparison
Git presentation1
Videoconferencing: Connect, Communicate and Collaborate
Must Know Web 2.0
Presentation Tools for the Classroom
Ad

Similar to Java basic-data-types (8)

DOC
Week2 dq3
PPSX
Java session3
PDF
2._Java_Syntax_and_Data_Type.pptx.pdf
PPT
JavaScript Data Types
PPTX
This is a python data types ppt it is used for bca student also
PPTX
Java programmer in java programming.pptx
PPTX
Data types casting and keywords in java.pptx
Week2 dq3
Java session3
2._Java_Syntax_and_Data_Type.pptx.pdf
JavaScript Data Types
This is a python data types ppt it is used for bca student also
Java programmer in java programming.pptx
Data types casting and keywords in java.pptx

More from Shahid Rasheed (7)

PDF
Java Variable Storage
PDF
Java Instantiation
PDF
Variable Naming Best Practices
PDF
Java Variable Types
PDF
Java Basic Operators
PDF
Java basic-syntax
PDF
What is-java
Java Variable Storage
Java Instantiation
Variable Naming Best Practices
Java Variable Types
Java Basic Operators
Java basic-syntax
What is-java

Recently uploaded (20)

PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
01-Introduction-to-Information-Management.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
master seminar digital applications in india
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Week 4 Term 3 Study Techniques revisited.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
01-Introduction-to-Information-Management.pdf
Complications of Minimal Access Surgery at WLH
Module 4: Burden of Disease Tutorial Slides S2 2025
Supply Chain Operations Speaking Notes -ICLT Program
master seminar digital applications in india
O5-L3 Freight Transport Ops (International) V1.pdf
Pre independence Education in Inndia.pdf
PPH.pptx obstetrics and gynecology in nursing
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Renaissance Architecture: A Journey from Faith to Humanism
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
TR - Agricultural Crops Production NC III.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
VCE English Exam - Section C Student Revision Booklet
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...

Java basic-data-types

  • 1. Primitive Data Types There are eight primitive data types supported by Java. Primitive data types are predefined by the language and named by a key word. Primitive types are not objects; so does not have any methods for further processing.
  • 2. Non Decimal ● byte - signed 8-bit ● short - signed 16-bit ● int - signed 32-bit ● long - signed 64-bit
  • 3. Decimal ● float - single-precision 32-bit ● double - double-precision 64-bit
  • 4. boolean ● boolean data type represents one bit of information ● There are only two possible values : true and false. ● Default value is false
  • 5. char ● 16-bit Unicode character ● Minimum value is ‘u0000′ (or 0). ● Maximum value is ‘uffff’ (or 65,535 inclusive)
  • 6. Reference Data Types Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed.
  • 7. Java Literals A literal is a source code representation of a fixed value.
  • 8. Java language supports few special escape sequences for String and char literals as well.