Tuesday, 26 July 2011

Data Types



 Data types
-Integers
-long (64 bit)
-Int(16 bit)
-short(16,bit)
-byte(8 bit)
-Floating-pointer numbers
-double(64 bit)
-float(32 bit)
-Characters(char, 16 bit)
-Booleans (Boolean, true or false)

Arrays
-Arrays in Java work differently than they do in other languages
-First declare the array
                        Int month_days=new int[12];
-Arrays can be initialized during declaration
-Multidimensional arrays
                        Int twoDp[][]=new int[4][5];
-Alternative array declaration
                        Int [] a2=new int[3];

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More