// integer decimal, binary, octal, hexadecimal printing
int n=245;
String st1,st2,st3,st4;
st1=""+n;
st2=Integer.toBinaryString(n);
st3=Integer.toOctalString(n);
st4=Integer.toHexString(n);
System.out.println(st1);
System.out.println(st2);
System.out.println(st3);
System.out.println(st4);
int n=245;
String st1,st2,st3,st4;
st1=""+n;
st2=Integer.toBinaryString(n);
st3=Integer.toOctalString(n);
st4=Integer.toHexString(n);
System.out.println(st1);
System.out.println(st2);
System.out.println(st3);
System.out.println(st4);
No comments:
Post a Comment