Consistent coding style is important in any development project, and particularly so when many developers are involved. A standard style helps to ensure that the code is easier to read and understand, which helps overall quality.
Writing your code in this way is an important step to having your code accepted by the community.
# Names
We write all names in CamelCase, i.e. capitalised English words with no spaces between them.
```java
i, max, numberPupils
```
## Class Names
Class names always begin with capital letters
```java
MyClass, Sausage, FirstClass
```
## Methods
Method names always begin with lower case letters
```java
firstMethod(), average()
```
## Variables
Variable names should always be easy-to-read, meaningful lower-case English words.
The only exception to this rule is for hyper local variables such as i, j, k in for loops.
## Constants
Constants should always be in upper case, they should have words separated by underscores.
```java
PI, MAX_TEMPERATURE
```
# Filenames
Filenames should :
- be whole English words be as short as possible
- use lowercase letters only
- end in .java
# Code Blocks
Place the ending curly brackets in line with the block header, and indent the code within the block as shown.
```java
for (int i = 1; i <10; i++) {
System.out.println(i);
}
```