-1

CharToString.java: Declare a character variable (char ch). Read a character into the variable ch and then store it in a String variable using the valueOf method. Print out both the char and string value at the end to test your program.
(Note that the valueOf method is static... this means that the method can be called without an instance of the class. Therefore you can say String.valueOf, this is similar to how you’ve used the random method in the math class.)

4
Contributors
3
Replies
13
Views
3 Years
Discussion Span
Last Post by jwenting
0

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you.

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

0

and if you copy paste your assignment, make sure you have the correct one. there's no such thing as a "string value" (case sensitive and such)

0

that assignment tells you literally what to do, it almost types it out for you.
If you still can't do it, it means you've not paid any attention in class.

Edited by JamesCherrill: Let's keep this polite please

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.