A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
Passing String to Character IS-A Methods
Joined: Apr 16, 2004
Jul 09, 2008 09:31:00
Is there are better way than this ?
aLetter = "A" ;
char  charArray = new char ;
charArray = aLetter.toCharArray() ;
boolean b = Character.isLetter(charArray) ;
Joined: Oct 14, 2005
Jul 09, 2008 09:45:00
Using the "charAt(int)" method of String would reduce the number of lines of code in that example.
I agree. Here's the link:
subject: Passing String to Character IS-A Methods
different question relating to the recursion
how do you convert CHAR TO STRING
How to read the complete contents of a file in a String?!
Read operation failed from Socket.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014