integer size java code example
Example 1: how to get length of integer in java
int length = (int) (Math.log10(number) + 1);
Example 2: int to long java
Long l= new Long(i); //first way
Long l2=Long.valueOf(i); //second way
int length = (int) (Math.log10(number) + 1);
Long l= new Long(i); //first way
Long l2=Long.valueOf(i); //second way