TEXAS TORQUE |
|
Avoid unnecessary public variables, getters, and setters, but use getters and setters to control access to private members.
Except for really long function declarations
public class Example {
public static void main(String[] args) {
if (args.length > 5) {
System.out.printf("Hello World!\n");
}
}
}
Examples of how to deal with long lines. This doesn’t matter too much, you can do it many ways.
public static ArrayList<String> reallyLongFunction(double thisArgument,
const String thatArgument, ThisClass anArgument) {
}
// This is one of the only time to put
// the curly brace on the next line
private ArrayList<double>
anotherFunction(double thisArgument,
const String thatArgument,
ThisClass anArgument)
{
}
String THIS_IS_SCREAMING_CASE = "Helicopter";
ThisIsAClass thisIsAVariable = new ThisIsAClass();
/**
* This says what the functions does
*
* @param int This describes the parameter
* @return This describes the return
*
* @author Just don't use this w/o asking
*/
int thisIsAFunction(int a) {
return -a;
}
Initially written by Justus Languell in August 2021