Abstract methods can not be static, because the abstraction of the method is to be implemented by the quilt, and static and the sub-class is not related!
The native method means that the method is implemented with another platform-dependent programming language, and there is no problem with the implementation of the quilt class, so it cannot be abstract and cannot be mixed with abstract. For example, the Fileoutputsteam class wants to deal with hardware, and the underlying implementation uses an operating system-related API implementation, for example, in the C language of Windows, so view the source code of the JDK, You can see that the FileOutputStream open method is defined as follows:
Private native Void Open (Stringname) throws FileNotFoundException;
If we want to use Java to call the C language function written by others, we can not directly call, we need to follow the Java requirements to write a C language function, and our C-language function to call someone else's C language function. Because our C language function is written according to Java requirements, we this C language function can interface with Java, Java side docking way is to define the method corresponding to our C function, the corresponding method in Java does not need to write the specific code, but need to declare native before.
I don't think it's a problem with synchronized and abstract, because I've never seen it in my years of study and development, and I think synchronized should be useful in a specific way. Furthermore, the synchronization lock object used by the synchronized synchronization on the method is this, and the abstract method cannot determine what this is.
Can the abstract method be static at the same time, can it be both native and synchronized?