Mega Code Archive

 
Categories / Java Tutorial / Development
 

Using the integral conversion characters

public class MainClass {     public static void main( String args[] )    {       System.out.printf( "%d\n", 26 );        System.out.printf( "%d\n", +26 );       System.out.printf( "%d\n", -26 );       System.out.printf( "%o\n", 26 );        System.out.printf( "%x\n", 26 );        System.out.printf( "%X\n", 26 );    } } 26 26 -26 32 1a 1A