Return to Coding in Java with artEoz – exercises

StringBuilder class

  1. If you wish to modify a string, the String class is not appropriate. You have to use the StringBuilder class.
    Enter this sequence of instructions:
  1. Add some instructions which use String to compare memory diagrams. Check that the option Simplified String display  is not selected and that Inherited attributes is selected.
  2. Write a call to the reverse() function which reverse the characters of sb2, store the result in a new variable. key_48 Is a new object created? How to know? key_48
  3. Call the deleteCharAt() transformation function which can delete a character at a specified position of sb2. key_48 What do you notice? key_48

Back to java exercises list