The toUnsignedString() method of Java Integer class returns a string representation of the argument as an unsigned decimal value.

The second syntax returns a string representation of the given argument as an unsigned integer value in the specified second argument.

Syntax

  • public static String toUnsignedString (int i)
  • public static String toUnsignedString (int i, int radix)

Parameters

The parameter ‘i’ represents an integer to be converted to an unsigned string and the parameter ‘radix’ represents the radix to use in the string representation.

Return Value

The first syntax of toUnsignedString() method returns an unsigned string representation of the argument.

The second syntax returns an unsigned string representation of the argument in the specified radix.

Example 1

Output

Example 2

Output

Example 3

Output

Pin It on Pinterest

Share This