The toOctalString() method of Java Integer class returns a string representing the specified int argument as an unsigned integer in base 8.

Syntax

public static String toOctalString (int  i)

Parameters

The parameter ‘i’ represents an integer to be converted to a string.

Return Value

This method returns the string which represents the unsigned integer value of the argument in octal i.e. base 8.

Example 1

Output

Example 2

Output

Example 3

Output

Example 4

Output

Pin It on Pinterest

Share This