I want to convert a primitive Java integer value: To an integer array: Answer There can be so many ways to do it. A concise way of doing it’s using Stream API as shown below: Output: Notes: ASCII value of ‘0’ is 48, that of ‘1’ is 49 and so on. Math#abs returns the absolute value of an int value