0% found this document useful (0 votes)
5 views

Data Types

Uploaded by

revathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Data Types

Uploaded by

revathi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Data Types,

Variables,
and Arrays
S.REVATHI AP/CSE
Java Is a Strongly Typed Language
Java is a strongly typed language-Safety and Robustness

Every variable has a type, every expression has a type, and every type is
strictly defined
Every assignments, whether explicit or via parameter passing in method
calls, are checked for type compatibility.
The Java compiler checks all expressions and parameters

Any type mismatches are errors that must be corrected before the compiler
will finish compiling the class.
The Primitive Types
Byte
short Integers Floating-point Characters Boolean
numbers
int
Long byte, short, int, float and char true/false
and long double
char
float
double
boolean
Integers

CODING DEMOS
Floating-Point Types

Character
The range of a char is 0 to 65,536
CODING DEMOS
CODING DEMOS

You might also like