Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link

What Attilio says is very correct, but I did notice some more ways to improve. #Built-in functions

Built-in functions

  • If you're using Java 8, you can use streams to simplify your sumArray method. Replace the body with return Arrays.stream(p).sum();.

  • The method copyArray can be replaced with a call to .clone() for the same effect.

What Attilio says is very correct, but I did notice some more ways to improve. #Built-in functions

  • If you're using Java 8, you can use streams to simplify your sumArray method. Replace the body with return Arrays.stream(p).sum();.

  • The method copyArray can be replaced with a call to .clone() for the same effect.

What Attilio says is very correct, but I did notice some more ways to improve.

Built-in functions

  • If you're using Java 8, you can use streams to simplify your sumArray method. Replace the body with return Arrays.stream(p).sum();.

  • The method copyArray can be replaced with a call to .clone() for the same effect.

Source Link

What Attilio says is very correct, but I did notice some more ways to improve. #Built-in functions

  • If you're using Java 8, you can use streams to simplify your sumArray method. Replace the body with return Arrays.stream(p).sum();.

  • The method copyArray can be replaced with a call to .clone() for the same effect.

lang-java

AltStyle によって変換されたページ (->オリジナル) /