"johnson" please read our JavaRanch Naming Policy. We encourage you to use your real name in the format <first name> <family name>. You can change your displayed name via the My Profile link. Thanks, -Barry
(NR) [ May 25, 2005: Message edited by: Barry Gaunt ]
Because the 'e' is at the end of the output string; there's nothing after the \b to overwrite it with. So the 'e' gets sent to the output device, then the output device is told to back up one space...and that's it. If the intent was to have the 'e' overwritten/removed, the string should have been something like Note the trailing space; that will overwrite the 'e'.
think of a backspace as hitting the left arrow key on your keyboard (and you have the "insert" turned off). if i type the letters
and then hit the left arrow, the cursor is between the d and e. if that's ALL i do, the e does not get overwritten. you haven't given it anything to overwrite the 'e' WITH. it's sitting there, saying "ok, i backed up to re-write whatevers in that spot, just tell me what it is..." but then you say "we're done writing - you can quit now", so the 'e' never gets written over, so it stays there.