I. Classification of classes:
1. General class
2. Abstract class (classes containing abstract methods)
3. Static class (classes that can be used without instantiation)
Ii. Classification of methods:
1. Private methods (methods that are accessible only within the class)
2. Protection methods (methods that only the inner of the class and the subclasses of the class can access)
3, common methods (regardless of internal or external access to the method)
4, static method (can not instance the session object, through the class name. Method can be called)
5. Abstract methods (methods that are not implemented because of the signature of the method)
Iii. invocation of the method:
1. General class: Instantiate an object of that class and then access it through the image. For example:
Class A {
Public void Method1 () {
System.out.println ("I am Method 1 of Class A");
}
}
public static void Main (string[] args) {
A a=new a ();
A.method1 ();
}
2, Static class: can be directly accessed through the class name, without instantiating the object. For example:
Class static A {
public static void Method1 () {
System.out.println ("I am Method 1 of Class A");
}
}
public static void Main (string[] args) {
A.method1 ();
}
3. Abstract class:
An abstract class cannot instantiate an object by itself.
An abstract class can only be instantiated by a subclass that inherits from him.
This is the subclass instantiation of the parent class object.
Method invocations for Java classes