type casting

hi there

i am trying to convert a int value to char (this is importtant as only chars can be sent to the tomcat server) but unfortunately when i do this and do a printout of the result i get garbage, is there a way around this?

here is the code:

int setplayer = 12;

char breakdown = (char)setplayer;

System.out.println("breakdown" + breakdown);

any help will be appreciated

regards

[430 byte] By [sheikh_khalida] at [2007-10-2 5:00:07]
# 1
Yes, don't convert to char ;)Right now, it will print ASCII 12, beeing a form feed.
deepspacea at 2007-7-16 1:04:06 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
thanks for the tip=))
sheikh_khalida at 2007-7-16 1:04:06 > top of Java-index,Java Mobility Forums,Java ME Technologies...