Abstract class specified interface

xiaoxiao2021-03-06  47

If a class can simply implement the single implementation,

But he is divided into two Abstract Class RFQMGrabstract class defines basic variables, as well as some abstract methods, such as Public Abstract RFQ Createrfq (String S, String S1)

The second class inherits his public class rfqManager Extends RFQMGrabstract to implement those methods

Do you think this is the benefit of doing this?

RfqManager is already final class won't be inherited, why is this design?

The implementation of subclasses in an abstract or interface is to say that the user, the interface is separated from the implementation, what is wrong?

C Declaration Implementation is separated, and it is achieved when compiling. This interface / implementation is in the run. It is convenient to expand it later. Get a good example of Abstract Class and Interface: Abstract Class Door {public void.com (); public void colse ();} Class MyDoor Extends Door Implements Alarm {// You want to have alarm function in your door / / Don't want to modify DOOR // but implement public void open () {} public void close () {} public void close () {} public void alarm () {}

转载请注明原文地址:https://www.9cbs.com/read-80468.html

New Post(0)