1. Define Interfaces
Use interfaces to define an interface. Similar definitions of interface definitions are similar. They are also divided into interface declarations and interface bodies. The interface body consists of constant definition and method definition. The basic format of the interface definition is as follows:
[Modifier] interface name [list of extends parent interface names] {
[Public] [static] [Final] constant;
[Public] [Abstract] method;
}
Modifier: Optional. It is used to specify the access permission for an interface. The optional value is public. If this parameter is omitted, the default access permission is used.
Interface Name: A required parameter used to specify the interface name. The interface name must be a valid Java identifier. Generally, uppercase letters are required.
Extends parent interface Name List: an optional parameter that specifies the parent interface to be defined. When the extends keyword is used, the parent interface name is a required parameter.
Method: The methods in the interface are defined and not implemented.
2. define abstract classes