Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes 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