Short answers to Q2 for CS 100
1.
public means that x can be accessed directly from anywhere.
static means that there is only one unique x for the class.
int means that x is of the primative datatype integer.
2.
If class B is a subclass of class A, then B inherits the fields and methods of A. Then, class B can define additional fields/methods of its own, or override the old fields/methods in A to give itself unique behavior. Thus B inherits A's functionality and can add on additional functionality. Think of B as a more specific version of A.
3.
x++ returns the value of x and then increments x by one.
4.
if (x>y) { max = x; } else { max = y; }