Skip to main content
Commonmark migration
Source Link

Let me start with the glaring issue, I want to get that done, and leave the rest to others,,

#Formatting

Formatting

Your code formatting is messy. there is just three things that are not indented in a java-file as per conventions.

these three things are:

  1. Package-declaration
  2. Import statements
  3. Class-opening and closing

Everything else is usually indented by either 4 spaces or 1 tab, in the least!
You nicely indented your for-loops though ;)

In addition to that, your operators and statements are a bit very cramped.
Oracle advises to and uses a few tricks to make operations more visible to the programmer:

  • Arithmetic operators (+,-,*,/,<,>) have a space before and after
  • Same goes for logical operators (&&,||,...)
  • before opening and after closing parentheses there is a space, but not if it's respectively after or before another parenthesis.

Let me start with the glaring issue, I want to get that done, and leave the rest to others,,

#Formatting

Your code formatting is messy. there is just three things that are not indented in a java-file as per conventions.

these three things are:

  1. Package-declaration
  2. Import statements
  3. Class-opening and closing

Everything else is usually indented by either 4 spaces or 1 tab, in the least!
You nicely indented your for-loops though ;)

In addition to that, your operators and statements are a bit very cramped.
Oracle advises to and uses a few tricks to make operations more visible to the programmer:

  • Arithmetic operators (+,-,*,/,<,>) have a space before and after
  • Same goes for logical operators (&&,||,...)
  • before opening and after closing parentheses there is a space, but not if it's respectively after or before another parenthesis.

Let me start with the glaring issue, I want to get that done, and leave the rest to others,,

Formatting

Your code formatting is messy. there is just three things that are not indented in a java-file as per conventions.

these three things are:

  1. Package-declaration
  2. Import statements
  3. Class-opening and closing

Everything else is usually indented by either 4 spaces or 1 tab, in the least!
You nicely indented your for-loops though ;)

In addition to that, your operators and statements are a bit very cramped.
Oracle advises to and uses a few tricks to make operations more visible to the programmer:

  • Arithmetic operators (+,-,*,/,<,>) have a space before and after
  • Same goes for logical operators (&&,||,...)
  • before opening and after closing parentheses there is a space, but not if it's respectively after or before another parenthesis.
Source Link
Vogel612
  • 25.5k
  • 7
  • 59
  • 141

Let me start with the glaring issue, I want to get that done, and leave the rest to others,,

#Formatting

Your code formatting is messy. there is just three things that are not indented in a java-file as per conventions.

these three things are:

  1. Package-declaration
  2. Import statements
  3. Class-opening and closing

Everything else is usually indented by either 4 spaces or 1 tab, in the least!
You nicely indented your for-loops though ;)

In addition to that, your operators and statements are a bit very cramped.
Oracle advises to and uses a few tricks to make operations more visible to the programmer:

  • Arithmetic operators (+,-,*,/,<,>) have a space before and after
  • Same goes for logical operators (&&,||,...)
  • before opening and after closing parentheses there is a space, but not if it's respectively after or before another parenthesis.