| Author |
Converting an Object to a Character?
|
Brandi Love
Ranch Hand
Joined: Sep 19, 2003
Posts: 133
|
|
is there a way to convert something of type Object to a Character?  [ April 01, 2004: Message edited by: Brandi Love ]
|
 |
Mike Gershman
Ranch Hand
Joined: Mar 13, 2004
Posts: 1272
|
|
All Objects have a toString() method which will give a String of characters represnting the object in printable form. An Object of type Character can be turned into a char primitive with its charValue() method: char c = myCharacter.charValue();
|
Mike Gershman
SCJP 1.4, SCWCD in process
|
 |
 |
|
|
subject: Converting an Object to a Character?
|
|
|