   [java] question about char to String casing
  hi.I''m learning programming and an assignment to reverse the order of a string.I have an idea that uses the charAt() method to extract a single char at a time from the last char in the string working backwords through a loop while appending these chars to a new string. Only problem is I keep running into incompatiblility issues.bottem line:does anybody know how I can concatenate a char to a string? any reply would be appreciatedthanx 
  If I understand you right, why not just use substring? ;  if you really want to do it this way, use a StringBuffer:http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.htmlcreate an empty StringBuffer, append() chars until you reach the end (append() is overloaded for all sorts of things, including chars), then do a toString() at the end to get your final reversed string.stringBuffers are *much* better for changing length strings, particularly large strings or if youre making them a lot...every time you concatenate a string you are actually making a new object. use a stringbuffer until you are finished changing it, then output to a string if you need to. ;  Thats exactly what I need!! thanks guys.I''m still new to the API, I woulda expected something like that to be in the string class. again, Thanks for the help ;  Strings are designed to be "value types" and thus immutable. StringBuffer is what you want.Yeah, I don''t really agree with that design decision either. I never liked using ''const'' in my C++ code either. 