Changes
Page history
Update Formatting
authored
Feb 21, 2022
by
Callum Gran
Show whitespace changes
Inline
Side-by-side
Formatting.md
View page @
0fb62c91
...
@@ -90,22 +90,24 @@ Examples of labels:
...
@@ -90,22 +90,24 @@ Examples of labels:
Example of a function:
Example of a function:
`class GenerateRandom {`
```
class GenerateRandom {
`
public int generateRandom(int param1, int param2) {
`
public int generateRandom(int param1, int param2) {
`
int min = param1;
`
int min = param1;
`
int max = param2;
`
int max = param2;
`
int random_int = (int)Math.floor(Math.random() * (max - min + 1) + min);
`
int random_int = (int)Math.floor(Math.random() * (max - min + 1) + min);
`
return random_int;
`
return random_int;
`}`
}
`
public static void main( String args[] ) {
`
public static void main( String args[] ) {
`
System.out.println(generateRandom(10, 40));
`
System.out.println(generateRandom(10, 40));
`}`
}
`}`
}
```
-
Tabwidth is 2 spaces.
-
Tabwidth is 2 spaces.
-
Newline before return sequence, unless it is a oneliner.
-
Newline before return sequence, unless it is a oneliner.
...
...
...
...