Java Integer.toOctalString(int i)

Syntax

Integer.toOctalString(int i) has the following syntax.

public static String toOctalString(int i)

Example

In the following code shows how to use Integer.toOctalString(int i) method.


public class Main {
  public static void main(String[] args) {
    System.out.println(Integer.toOctalString(7));
    System.out.println(Integer.toOctalString(8));
    System.out.println(Integer.toOctalString(9));
    System.out.println(Integer.toOctalString(10));
    System.out.println(Integer.toOctalString(100));
  }//from w  w w  .j  a v  a  2  s .co m
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable