Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step. (This is a long answer, link to bottom of answerlink to bottom of answer)

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step. (This is a long answer, link to bottom of answer)

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step. (This is a long answer, link to bottom of answer)

added 17 characters in body
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144

ThisCreating a new String could be simplified to "". The only time you'll actually use the String constructor is for creating strings from arrays like char[] or byte[].

This could be simplified to "". The only time you'll actually use the String constructor is for creating strings from arrays like char[] or byte[].

Creating a new String could be simplified to "". The only time you'll actually use the String constructor is for creating strings from arrays like char[] or byte[].

add bottom link
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step. (This is a long answer, link to bottom of answer)

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step.

Lots of answers already, but most of them seem to be about alternative solutions. I'll review your code on the details and show you how to refactor your code step by step. (This is a long answer, link to bottom of answer)

I cannot stop rephrasing
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144
Loading
added 20 characters in body
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144
Loading
added 13 characters in body
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144
Loading
added 127 characters in body
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144
Loading
Source Link
Pimgd
  • 22.3k
  • 5
  • 66
  • 144
Loading