The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

reply of ascii characters for stimpy

Posted by ruchi hema on October 31, 2000 at 12:35 AM

hi..
actually we r not getting yr que. but this code may help u .the cod

class test{

public static void main (String args[]){

char tt =(char)0x7;//u can even pass octal val 007
System.out.println(Integer.toOctalString(tt));
}
}

output will be : 7

other related methods are : Integer.toBinaryString(int target)
Integer.toHexString(int target)





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us