Abstract Data Type and Interface

前端 未结 8 1370
小鲜肉
小鲜肉 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:28

    What is the difference between Abstract data type and Interface.
    
    1. Variables declared in a Java interface is by default final. An abstract class may contain non-final variables.
    2. Members of a Java interface are public by default. A Java abstract class can have the usual flavors of class members like private, protected, etc.. check this link for info

提交回复
热议问题