[Java] TDD Barely #3 (July 15th, 2020)

less than 1 minute read

New knowledge


You can access the variable without instantiating the class that contains static. This variable is called a static variable or class variable. Class variables can be used differently like global variables.

Access modifier static type name variable name // declaration
Class name.variable name //call

abstract class

It is used when you do not know what to do. The abstract method does not write the processing content. Abstract classes cannot be instantiated.

abstract class Sample {// Declaration of abstract class
    abstract void test(); // Declaration of abstract method. There is no {}.

An abstract class is a class that is supposed to be a parent class. The abstract method is overridden in the subclass to determine the processing contents.


Access the variables and methods of the parent class from the child class.

super. method name // Call parent class method.