This is a draft cheat sheet. It is a work in progress and is not finished yet.
Main
public class MyAppEntryPoint {
public static void main(String[] args) {
// args[0] is the first command-line argument
}
}
|
Construction
public class MySubClass
extends TheSuperClass
{
// default constructor
public MySubClass() {
super(); // calls TheSuperClass' constructor. Must be called first.
// the above line can be omitted; the call to TheSuperClass' default constructor is performed implicitly.
}
// additional constructor
public MySubClass(int i) {
this(); // calls above MySybClass' constructor. Must be called first.
}
}
|
|
|
|
|
|