This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

char to string conversion

 
gopal singh
Greenhorn
Posts: 9
  • 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
  • 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
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks u very much somaaiya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic