wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes char to string conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "char to string conversion" Watch "char to string conversion" New topic
Author

char to string conversion

gopal singh
Greenhorn

Joined: Feb 06, 2001
Posts: 9
how to store a character variable into string object
babla somaiah
Greenhorn

Joined: Feb 02, 2001
Posts: 6

hi gopal,
the program below gives the solution to ur problem.
the line of code with ******* is the exact conversion
class demo
{
public static void main(String args[])
{
char b;
String bab;
b='m';
bab=String.valueOf(b);//*************
System.out.println(bab);
}
}
regards,
babla
gopal singh
Greenhorn

Joined: Feb 06, 2001
Posts: 9
thanks u very much somaaiya
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: char to string conversion