aspose file tools
The moose likes Beginning Java and the fly likes How to convert a string to char? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to convert a string to char?" Watch "How to convert a string to char?" New topic
Author

How to convert a string to char?

Ramu Rondla
Greenhorn

Joined: Oct 04, 2003
Posts: 9
Hello friends,
Is there any way to convert a string to char?
example "java" to 'java'

Thanks,
Ramu
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24057
    
  13

"java" is four characters -- it doesn't make sense to ask about converting a string to a single character. "java".charAt(0) is the first one ('j') and "java".charAt(3) is the last one ('a').


[Jess in Action][AskingGoodQuestions]
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 965

See examples here: click


Please ignore post, I have no idea what I am talking about.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert a string to char?
 
Similar Threads
How to convert a String to char
convert String to char
convert String to char
String = char -- didnolikethis!
changing a String to a char