我只到 
long i=10L;
long i=10l;
这两种写法是对的
其他基本类型怎么写?
是不是不区分大小写?

解决方案 »

  1.   

    怎能不区分
    Long 表示类
    long 才是基本类型
      

  2.   

    public class T5 {
    public static void main(String[] args) {
    int a = new Integer("0");
    short b = (short)65536;
    long c = 0000000000000000000L;
    byte d = (byte)256;
    char e = (char) 48;
    String f = new String("0");

    System.out.println(a);
    System.out.println(b);
    System.out.println(c);
    System.out.println(d);
    System.out.println(e);
    System.out.println(f);
    }
    }随便写写,希望能对你有用~~
      

  3.   

    Java是严格区分大小写的。
    原始类型     封装类 
    boolean      Boolean 
    char         Character 
    byte         Byte 
    short        Short 
    int          Integer 
    long         Long 
    float        Float 
    double       Double 
    引用类型和原始类型的行为完全不同,并且它们具有不同的语义。例如,假定一个方法中有两个局部变量,一个变量为 int 原始类型,另一个变量是对一个 Integer 对象的对象引用:int i = 5;                       // 原始类型
    Integer j = new Integer(9);     // 对象引用
     
      

  4.   

    我是说数字后面跟L或l这种写法我只到 
    long i=10L;
    long i=10l;
    这两种写法是对的
    其他基本类型怎么写?
    是不是不区分大小写?
      

  5.   

    int a = new Integer("0");
    不能这样转换
    在java中
      长的不能转为短的类型
      

  6.   

    大写的是class
    小写的是基本类型
      

  7.   

    public Text{
    public static void main(String []args)
    {long i=10L;
    long j=10l;
    System.out.println("i="+i+"  "+"j="+j);
    }
    }
      

  8.   

    常量值之后添增的字符系用来表明数值的型别。大写或小写的L意指long,大写或小写的F意指float,大写或小写的D意指double。不区分大小写long l1 = 10L;
    long l2 = 10l;
    float f1 = 1e+5f;
    float f2 = 2e-9F;
    double d1 = 1d;
    double d2 = 1D;
      

  9.   

    刚试了一下.确实       
    long i = 10l;
    long l = 10L;都是一样的
      

  10.   

    tianshul8说清楚了,也就顶下。^_^
      

  11.   

    在网上查查,有primitive 类型和Wrapper类型的对照表,我不记得了!