File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

char to string conversion

 
gopal singh
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to store a character variable into string object
 
babla somaiah
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks u very much somaaiya
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic