Can abstract methods be public in Java?

Can abstract methods be public in Java? Are abstract methods implicitly exposed, or if you don't specify whether they are packaged? (conventional method implicit packaging correct?) Is there a visibility modifier that an abstract method cannot have? (personal disturbance, I have a problem)

Solution

Abstract methods have the same visibility rules as ordinary methods, but they cannot be private

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>