Friday, 6 June 2014

Data Types in JAVA

Primitive Data Types :

This kind of data types have fixed size . Here is the list of various Primitive data types in JAVA with their corresponding size .

  1.   short       :  Size 2 bytes 
  2.  int            :  Size 4 bytes
  3.  long         :  Size 8 bytes
  4. double      :  Size 8 bytes
  5.  char         :  Size  2 bytes
  6.  boolean   :  Size 1 bit


NON - Primitive Data Types : 

This kind of data types have variable size ... i.e. can have user defined size .
In JAVA we normally have three types of data types as non primitive data types :

  1. Classes
  2.  Array
  3.  String 


Size of these data types is defined by user and we will check later in the blog .

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes