Skip to main content
added 8 characters in body
Source Link

It worth to definedefining it a static final field to make it an explicit notion:

  • Dot operator . is meant to precedebe placed before a method call, don't leave it dangling at the end of the previous line.

  • Use standard indentations.

  • Don't skimp on white-spaces (there are some missing in the for-loop).

  • If you're using IntelliJ, shortcut for reformatting Ctrl + Alt + L (note, that it's a good practice to select a certain code element, rather than reformatting the whole file).

It worth to define it a static final field to make it an explicit notion:

  • Dot operator . is meant to precede a method call, don't leave it dangling at the end of the previous line.

  • Use standard indentations.

  • Don't skimp on white-spaces (there are some missing in the for-loop).

  • If you're using IntelliJ, shortcut for reformatting Ctrl + Alt + L (note, that it's a good practice to select a certain code element, rather than reformatting the whole file).

It worth defining it a static final field to make it an explicit notion:

  • Dot operator . is meant to be placed before a method call, don't leave it dangling at the end of the previous line.

  • Use standard indentations.

  • Don't skimp on white-spaces (there are some missing in the for-loop).

  • If you're using IntelliJ, shortcut for reformatting Ctrl + Alt + L (note, that it's a good practice to select a certain code element, rather than reformatting the whole file).

deleted 4 characters in body
Source Link

That's the cleanest way to achieve this (let's blind on the use of the magic number 5 for now), it'sthis stream statement is concise and bears low cognitive load.

That's the cleanest way to achieve this, it's concise and bears low cognitive load.

That's the cleanest way to achieve this (let's blind on the use of the magic number 5 for now), this stream statement is concise and bears low cognitive load.

deleted 4 characters in body
Source Link

With streams it's not always possible to terminate the execution early (that's a downside of relinquishing the total control over the iterations process). For instance, collect() operation lacks notlacks short-circuiting.

With streams it's not always possible to terminate the execution early (that's a downside of relinquishing the total control over the iterations process). For instance, collect() operation lacks not short-circuiting.

With streams it's not always possible to terminate the execution early (that's a downside of relinquishing the total control over the iterations process). For instance, collect() operation lacks short-circuiting.

added 558 characters in body
Source Link
Loading
added 15 characters in body
Source Link
Loading
added 111 characters in body
Source Link
Loading
Source Link
Loading