long和int互转
现在分long,Long,int,Integer互相转换,分8种情况
- a , b
- long, int b=(int)a;
- long,Integer b= new Long(a).intValue();
- Long,int b= a.inValue();
- Long,Integer b= a.intValue()
- int, long b= a
- int,Long b= new Integer(a).LongValue();
- Integer,long b= a.longValue()
- Inter,long b= a.longValue();