how to get number length of string in java code example
Example 1: len of number in java
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int length = String.valueOf(n).length();
System.out.print(length);
Example 2: java check for string length
String data = "Hello, World!";
int nameLength = data.length(); // 13