Java基础数据类型_0

//整型、浮点型、布尔型、字符型
 public class Hello
 {
     public static void main(String args[])
     {
         //整型:
         short a=10;        //2个字节
         int   b=20;        //4个字节
         long  c=30;        //8个字节
 
         //浮点型:
         float  a=3.4f;    //4个字节
         double b=3.4;    //8个字节
 
         //布尔型
         boolean a=True;    //1个字节
 
         //字符型
         char a='a';        //2个字节
     }
 }

 

 

posted on 2013-04-18 11:31  bbooxx  阅读(229)  评论(0)    收藏  举报

导航