5.2. Indentation / WhiteSpace

5.2.1. Indentation

The space is used instead of the tab character. The number of spaces for an indent is 4 spaces.

The wrapping lines follow the Java code convention in this part.

5.2.2. WhiteSpace

The trailing spaces should be removed. There is an eclipse plug in that removes the trailing spaces and converts the tab into spaces. The plug in is AnyEdit.

Use whitespaces in for() loop, while(), when concatenating strings. One space should be added before the operator and other after the operator. For example, the correct is:

for (int i = 0; i < arTest.length; i++) {
    String strResult = "The element " + i + " has the value " + arTest[i];
 }

The follow code does not follow the convention:

 for (int i = 0; i< arTest.length; i++) {
     String strResult = "The element "+ i+" has the value "+arTest[i];
 }