| Author |
Passing String to Character IS-A Methods
|
Graeme Byers
Ranch Hand
Joined: Apr 16, 2004
Posts: 127
|
|
Is there are better way than this ? String aLetter = "A" ; char [] charArray = new char[1] ; charArray = aLetter.toCharArray() ; boolean b = Character.isLetter(charArray[0]) ; Thank you.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
|
Using the "charAt(int)" method of String would reduce the number of lines of code in that example.
|
 |
 |
|
|
subject: Passing String to Character IS-A Methods
|
|
|