Static and non-static members (variables and methods). Name/access a static (class) member: . A static member can be accessed right away. A class is a container: static members + blueprint. We're defining a static methode with no return type. How many kinds of variables do we have in Java? Answer: let's list them, all 4 (four) a) static variables . b) instance variables . "this" is a reference an object can use to refer to itself c) local variables (defined in methods) d) parameters (like local variables, but they hold the inputs) Local variables are defined in methods, they need to initialized before they are used, they do not exist before their definition and they don't last beyond the moment when the method ends. One needs to initialize local variables before you can use them. Params are initialized when the method is invoked. Static and non-static members do not need to be initialized by us. There are four primitive types: numbers (int, float), char, boolean. Everything else is a user defined type (class). ------ class One { static int x; static void report() { // no inputs, no params // no local variables in this method System.out.println(One.x); } static int add(int a, int b) { // params int r; // local variables System.out.println(r); r = a + b; return r; } } class Two { public static void main(String[] args) { One.x = 3; // One.report(); System.out.println(One.add(1, 2) + 2); } } ----- class Point { int x, y; Point() { this.x = 0; this.y = 0; } Point(int a, int b) { this.x = a; this.y = b; } void report() { System.out.println(this.x + ", " + this.y); } double distanceTo(Point other) { int dx = this.x - other.x; int dy = this.y - other.y; return Math.sqrt(dx * dx + dy * dy); } } class Experiment { static double distance(Point u, Point t) { int dx = u.x - t.x; int dy = u.y - t.y; return Math.sqrt(dx * dx + dy * dy); } public static void main(String[] args) { Point a, b; a = new Point(); a.x = 3; a.y = 4; b = new Point(-1, 2); a.report(); b.report(); System.out.println(Experiment.distance(a, b)); System.out.println(a.distanceTo(b)); } }