Two Laptop Bag
The moose likes Beginning Java and the fly likes char to string conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: char to string conversion
 
Similar Threads
How to convert byte array into string array?
date format with MS Access database
Tech Word Game
WA #1.....word association
ResultSet to Array