Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lectures/17-oop/notes/interface.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Instead we have java interfaces. they have abstract functions (no body of functi

Interface is like class but not completely. it is like an abstract class.
By default functions are public and abstract in interface.
variables are final and static by default in interface.
variables are final and static by default in interface. as interfaces dont have a constructor if you define non final fields they need to be intialized which is not possible in interface hence interfaces have static final variables.

Interfaces specify only what the class is doing, not how it is doing it.
The problem with MULTIPLE INHERITANCE is that two classes may define different ways of doing the same thing,
Expand Down