Abstract Data Type and Interface

前端 未结 8 1371
小鲜肉
小鲜肉 2021-02-04 18:26

I am new to Java. What is the difference between Abstract data type and Interface.

For Example We have a ListADT

interface MyListADT {
    void          


        
8条回答
  •  情话喂你
    2021-02-04 19:17

    The combination of data with its methods is called an Abstract Data Type (ADT).

    A Java Interface is a way to specify an Abstract Data Type (ADT).

    You can declare a class as abstract when it contains zero or more abstract methods or When an interface is implemented to a class where not all methods are not implemented.

提交回复
热议问题