Mega Code Archive
Categories
/
Java Tutorial
/
Development
Using the # flag with conversion characters o and x
public class MainClass { public static void main( String args[] ) { int c = 31; // initialize c System.out.printf( "%#o\n", c ); System.out.printf( "%#x\n", c ); } } 037 0x1f