Java basics

1. Only three members can appear in the interface.
1. Public static constant (public final static)
2. Public abstract method (public abstract )
3. Static inner class (static class)

In a class, even if you don't write anything, you must also take a constructor. In the extends, it will be inherited by the subclass. If the interface inherits the constructor, it is obviously constructed. Method is not in the above three items
and if there are general methods and member variables in the class, they will all be inherited by the subclass. These can't appear in the interface, so

It is absolutely impossible to inherit a class from an interface.

 

2. The interface cannot implement the interface.

Third, the interface is the implementation of the interface, not the method of the parent interface.

The abstract class implements the interface, and can also implement the method of the parent interface. Nothing is written, which also explains the method of the interface inheritance interface is not written.

 

Five. Abstract classes cannot be instantiated

Intelligent Recommendation

What is the difference between you and the data analyst at BAT?

Speaking of popular high-paying jobs in recent years, data analysts are definitely the top card. On the one hand, the salary is high. Open the Lagou Recruitment App and you will find that the salary o...

WeChat Mini Program Implementation Picture Preview function

The small program has the wx.preViewImage method that provides preview pictures Put the picture tag on the page first We added a click event called Preview to the picture Then we write this click even...

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - c

  Careful to discover is the configuration problem in the web, <XXX-mapping> must be ordered to discharge    ...

Use the composite key to access the database

Since the old oracle database table does not have the id primary key column required by the standard ActiveRecord,composite_primary_keys.gem to solve the problem.   After downloading and installi...

Browser cache

Strong cache: Read directly from the local, without asking the server, return status code 200. When requesting a resource, it will read the time from the header and determine whether it is obtained fr...

More Recommendation

Chapter 7 Caché Algorithm and Data Structure Deque

Article Directory Chapter 7 Caché Algorithm and Data Structure Deque Array circular queue Implementation Define node class Queue implementation class transfer Chapter 7 Caché Algorithm a...

30 companies including Xiaomi were interviewed: the rectification of harassing calls should take effect in a short time

    Yesterday, the Information and Communication Administration of the Ministry of Industry and Information Technology focused on the recent "95" number and mobile resale service &...

Computer Network Reference Model 2

Theory introduction 1. Data encapsulation and decapsulation process 2. Some basic concepts of related data transmission 3. Communication between each layer of the TCP/IP five-layer model 1. Data encap...

Please explain the difference between this and super?

****Interview question:Please explain the difference between this and super? Remember: · this. method (): first find out if there is a specified method from this class, if not found, then call ...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top