Answers for "integer size java"

7

how to get length of integer in java

int length = (int) (Math.log10(number) + 1);
Posted by: Guest on April-22-2020
0

int to long java

Long l= new Long(i); //first way
Long l2=Long.valueOf(i); //second way
Posted by: Guest on June-22-2020
1

getting the size of int

try:
    Number = int(input("Input any Number:- "))
    converson = str(Number)
    Size = len(converson)
    print("The size of Intger is ",Size)
except:
    print("Input is incorrect")
Posted by: Guest on July-27-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language