The space character is used instead of the tab character. The number of spaces for an indent is 4 spaces.
Wrapping a single source line into multiple lines should follow the Java code convention.
Any trailing spaces should be removed. Eclipse provides a plugin that removes the trailing spaces and converts the tab into spaces. The plugin is AnyEdit.
Use whitespaces in for() loop, while(), when concatenating strings. One space should be added before the operator and another after the operator. For example, the correct syntax is:
for (int i = 0; i < arTest.length; i++) { String strResult = "The element " + i + " has the value " + arTest[i]; }
The following code does not adhere to the convention:
for (int i = 0; i< arTest.length; i++) { String strResult = "The element "+ i+" has the value "+arTest[i]; }