A hint for this question will be highly appreciated.
I am unable to solve this.
Under discussion
Comments (6)
- Popular
- New
- Old
You must be signed in to leave a comment
Slawomir I.
8 May 2020, 05:21
You can read about StringBuilder too
0
Jason Cain
23 January 2020, 03:17
Hey Daniel,
I doubt you're still on this problem...at least i hope you're not but I would recommend using StringBuffer and deleting the first character each time. This way you're not creating new string objects each time you loop.
0
Mudassar Majgaonkar
25 May 2019, 17:48
Use substring method of String class and iterate over the String indexes
0
Ramilya
9 March 2019, 18:08
You can read about String methods in official documentation of Oracle.
0
Fadi AlSaidi
9 February 2019, 22:01
I am not an expert, but I would suggest you either:
1-convert the string to char[] and loop through the characters to make a new String,with each String removing one Character.
2-convert into an Arraylist<Character>, loop through removing one arraylist at a time, make a new string with each new shrinking Arraylist<Character>.
hope that helps
0
Guadalupe Gagnon
8 February 2019, 14:28
This task requires you to remove one space from the beginning of the text line each loop cycle. Use google to help.
0