How to print the numbers (0-9) using unicode in Java

1 Answer

0 votes
public class MyClass {
    public static void main(String args[]) {
        for (char ch = '\u0030'; ch <= '\u0039'; ch++)
            System.out.println(Character.toString(ch));
    }
}


/*
run:

0
1
2
3
4
5
6
7
8
9

*/

 



answered Jun 13, 2019 by avibootz
...