Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Cast a String to a char
Toulouse Laurent
Greenhorn
Posts: 8
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Anyone know how to cast a
String
to a char?
David O'Meara
Rancher
Posts: 13459
I like...
posted 22 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
well, you don't. A String is an Object and a char is a primitive. If the String only has one one char in it, use char aChar = aString.charAt(0);
Dave
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to cast a String to java.sql.types.CHAR
SQL ResultSet
SQL ResultSet
Operators
about char declair
More...