Your SlideShare is downloading. ×
0
Data Types in JAVA
Java is a Statically-Typed Language. Ex : variabletype variablename = data;Dynamically-Typed Languages include (Ruby,Tcl,P...
primitive type   Wrapper typebyte             Byteshort            Shortint              Integerlong             Longfloat...
public class MaxDemo {         public static void main(String args[]) {        //integers           byte largestByte = Byt...
//Display them all.     System.out.println("largest byte value is " + largestByte + ".");     System.out.println("largest ...
Auto Boxing ?UnBoxing ?
Overflow ?When does it occur ?
JAVA Data Types - Part 1
JAVA Data Types - Part 1
JAVA Data Types - Part 1
JAVA Data Types - Part 1
JAVA Data Types - Part 1
JAVA Data Types - Part 1
JAVA Data Types - Part 1
Upcoming SlideShare
Loading in...5
×

JAVA Data Types - Part 1

1,150

Published on

Published in: Technology, News & Politics
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,150
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
38
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "JAVA Data Types - Part 1"

  1. 1. Data Types in JAVA
  2. 2. Java is a Statically-Typed Language. Ex : variabletype variablename = data;Dynamically-Typed Languages include (Ruby,Tcl,Python,JavaScript)Primitive Types :Wrapper Types :
  3. 3. primitive type Wrapper typebyte Byteshort Shortint Integerlong Longfloat Floatdouble Doublechar Characterboolean Boolean
  4. 4. public class MaxDemo { public static void main(String args[]) { //integers byte largestByte = Byte.MAX_VALUE; short largestShort = Short.MAX_VALUE; int largestInteger = Integer.MAX_VALUE; long largestLong = Long.MAX_VALUE; //real numbers float largestFloat = Float.MAX_VALUE; double largestDouble = Double.MAX_VALUE; //other primitive types char aChar = S; boolean aBoolean = true; }}
  5. 5. //Display them all. System.out.println("largest byte value is " + largestByte + "."); System.out.println("largest short value is " + largestShort + "."); System.out.println("largest integer value is " + largestInteger + "."); System.out.println("largest long value is " + largestLong + "."); System.out.println("largest float value is " + largestFloat + "."); System.out.println("largest double value is " + largestDouble + ".");The largest byte value is 127.The largest short value is 32767.The largest integer value is 2147483647.The largest long value is 9223372036854775807.The largest float value is 3.4028235E38.The largest double value is 1.7976931348623157E308.
  6. 6. Auto Boxing ?UnBoxing ?
  7. 7. Overflow ?When does it occur ?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×