(as opposed to fixed arity methods) or simply varargs method. This allows one to pass a variable number of values, of the declared type, to the method as parameters - including no parameters. These values will be available inside the method as an array. void printReport(String header, int... numbers) { //numbers represents varargs System.out.println(header); for (int num : numbers) { System.out.println(num); } } // Calling varargs method printReport("Report data", 74, 83, 25, 96); Fields Fields, or class variables, can be declared inside the class body to store data. class Foo { double bar; } Fields can be initialized directly when declared. class Foo { double bar = 2.3; } Modifiers static - Makes the field a static member. final - Allows the field to be initialized only once in a constructor or inside initialization block or during its declaration, whichever is earlier. transient - Indicates that this field will not be stored during serialization. volatile - If a field is declared volatile, it is ensured that all threads see a consistent value for the variable. Inheritance Classes in Java can only inherit from one class. A class can be derived from any class that is not marked as final. Inheritance is declared using the extends keyword. A class can reference itself using the this keyword and its direct superclass using the super keyword. class Foo { } class Foobar extends Foo { } If a class does not specify its superclass, it implicitly inherits from java.lang.Object class. Thus all classes in Java are subclasses of Object class. If the superclass does not have a constructor without parameters the subclass must specify in its constructors what constructor of the superclass to use. For example: class Foo { public Foo(int n) { // Do something with n } } class Foobar extends Foo { private int number; // Superclass does not have constructor without parameters // so we have to specify what constructor of our superclass to use and how public Foobar(int number) { super(number); this.number = number; } } Overriding methods Unlike C++, all non-final methods in Java are virtual and can be overridden by the inheriting classes. class Operation { public int doSomething() { return 0; } } class NewOperation extends Operation { @Override public int doSomething() { return 1; } } Abstract classes An Abstract Class is a class that is incomplete, or to be considered incomplete. A class