SlideShare a Scribd company logo
Are Java Primitive Variables Objects?
Are Java Primitive Variables Objects?
Yes Or

NO!
Java Language

Specifications
:: DEFINITIONS ::
4.12 Variables: A variable is a storage
location and has an associated type,
sometimes called its compile-time type,
that is either a primitive type (§4.2) or a
reference type (§4.3).
:: DEFINITIONS ::
4.12.1 Variables of Primitive Type: A
variable of a primitive type always holds a
value of that exact primitive type.
:: DEFINITIONS ::
4.12.2 Variables of Reference Type: A
variable of a class type T can hold a null
reference or a reference to an instance
of class T or of any class that is a subclass of
T.
Are

Variables

Objects?

NO!
Byte
Float

Integer

Type Wrapper Classes
Long
Character

Double
Boxing

valueOf( type arg )

AutoBoxing
intValue( )

charValue( )
booleanValue( )

Unboxing
:: EXAMPLE ::
Integer x , y ;
x = 12 ;
y = 15 ;
System.out.println( x + y );
Are

Variables

Objects?

NO!

NO!

NO!
:: REFERENCES ::
http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf
http://www.javaranch.com/campfire/StoryCups.jsp
http://www.javaranch.com/campfire/StoryPassBy.jsp
http://java.sun.com/docs/books/tutorial/java/data/numberclasses.html
http://java.sun.com/j2se/1.5.0/docs/guide/language/autoboxing.html

http://forums.sun.com/thread.jspa?threadID=5387311
Discussion
Thanks

More Related Content

PPT
A944346117 22750 24_2018_equivalence of dfa and ndfa
PDF
Value Types
PPTX
Why Java is not a purely object oriented language?
PDF
Java data types, variables and jvm
PPTX
Java basics and java variables
PDF
Is Java seen as a pure object-oriented language or not?
PPTX
Java Data Types and Variables
PDF
Core Java Programming Language (JSE) : Chapter III - Identifiers, Keywords, ...
A944346117 22750 24_2018_equivalence of dfa and ndfa
Value Types
Why Java is not a purely object oriented language?
Java data types, variables and jvm
Java basics and java variables
Is Java seen as a pure object-oriented language or not?
Java Data Types and Variables
Core Java Programming Language (JSE) : Chapter III - Identifiers, Keywords, ...

What's hot (20)

PDF
PPTX
What is java polymorphism and its types in java training?
PPTX
Decision properties of reular languages
PPTX
Decision properties of reular languages
PPT
Primitive data types in java
PDF
Java basic data types
PPT
Data types
PPTX
Csc240 -lecture_4
PDF
7-Java Language Basics Part1
PDF
DTS s03e04 Typing
PDF
Object-Oriented Polymorphism Unleashed
PPTX
Type Systems
PPTX
Finite Automata in compiler design
PDF
Data types in Java
PPT
java introduction
PDF
Object oriented programming interview questions
KEY
Clojure - an introduction (and some CFML)
PDF
(6) c sharp introduction_advanced_features_part_i
PDF
Classroom Object Oriented Language (COOL)
PPTX
Inheritance and Polymorphism
What is java polymorphism and its types in java training?
Decision properties of reular languages
Decision properties of reular languages
Primitive data types in java
Java basic data types
Data types
Csc240 -lecture_4
7-Java Language Basics Part1
DTS s03e04 Typing
Object-Oriented Polymorphism Unleashed
Type Systems
Finite Automata in compiler design
Data types in Java
java introduction
Object oriented programming interview questions
Clojure - an introduction (and some CFML)
(6) c sharp introduction_advanced_features_part_i
Classroom Object Oriented Language (COOL)
Inheritance and Polymorphism
Ad

Viewers also liked (6)

PPT
Web Project Presentation - JoinPakForces
PPT
A Review of Microsoft Windows Vista
PPT
Modern Logic - Introduction to Logic
PPT
C++ Preprocessor Directives
PPT
Software User Interface Design Ergonomics
PPT
Introduction to Logic
Web Project Presentation - JoinPakForces
A Review of Microsoft Windows Vista
Modern Logic - Introduction to Logic
C++ Preprocessor Directives
Software User Interface Design Ergonomics
Introduction to Logic
Ad

Similar to Are Java Primitive Variables Objects? (7)

PPT
Introduction to-programming
PPT
PDF
JAVA Class Presentation.pdf Vsjsjsnheheh
PPSX
Data Types & Variables in JAVA
PPT
Core_java_ppt.ppt
PPTX
dizital pods session 2.pptx
ODP
Generic Programming
Introduction to-programming
JAVA Class Presentation.pdf Vsjsjsnheheh
Data Types & Variables in JAVA
Core_java_ppt.ppt
dizital pods session 2.pptx
Generic Programming

Recently uploaded (20)

PDF
RMMM.pdf make it easy to upload and study
PPTX
Institutional Correction lecture only . . .
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Classroom Observation Tools for Teachers
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
RMMM.pdf make it easy to upload and study
Institutional Correction lecture only . . .
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Classroom Observation Tools for Teachers
Chinmaya Tiranga quiz Grand Finale.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial disease of the cardiovascular and lymphatic systems
STATICS OF THE RIGID BODIES Hibbelers.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
VCE English Exam - Section C Student Revision Booklet
human mycosis Human fungal infections are called human mycosis..pptx
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Final Presentation General Medicine 03-08-2024.pptx
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Anesthesia in Laparoscopic Surgery in India
A systematic review of self-coping strategies used by university students to ...
Abdominal Access Techniques with Prof. Dr. R K Mishra

Are Java Primitive Variables Objects?