📜  如何在java代码示例中获取整数的长度

📅  最后修改于: 2022-03-11 14:52:47.547000             🧑  作者: Mango

代码示例3
int length = 0;
long temp = 1;
while (temp <= number) {
    length++;
    temp *= 10;
}
return length;