Java examples for Language Basics:int
Convert decimal integer to octal number example
public class Main { public static void main(String[] args) { //from ww w . ja v a2 s . c o m int i = 27; String strOctalNumber = Integer.toOctalString(i); System.out.println("Convert decimal number to octal number example"); System.out.println("Octal value of " + i + " is " + strOctalNumber); } }