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
convert String to char
Robert Johnson
Ranch Hand
Posts: 32
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how do you convert a
string
to a char
Whats in a name?
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Assuming it's a one-character String, you just want
String s = "a";
char a = s.charAt(0);
[Jess in Action]
[AskingGoodQuestions]
Robert Johnson
Ranch Hand
Posts: 32
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yea, that worked fine thanks.
Do you know how to initialize a char variable?
i.e,
char letter = ?;
Whats in a name?
Tim McGuire
Ranch Hand
Posts: 820
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
try a google search on "java define primitive types"
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
String indexing
convert String to char
Convert char array into a string
changing a String to a char
Convert "\n" to char '\n'
More...