Skip to content

Commit 4c4fbb7

Browse files
committed
Section 14 Interfaces
Signed-off-by: https://github.com/Someshdiwan <[email protected]>
1 parent 0e4667f commit 4c4fbb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Section14Interfaces/src/Interfaces.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ An interface in Java contributes to polymorphism by defining a contract for impl
22

33
It declares a set of abstract methods that must be implemented by any class that implements the interface.
44

5-
This allows for polymorphic behavior, as different classes can provide their own implementations of the interface methods.
5+
This allows for polymorphic behavior, as different classes can provide their own implementations of the interface
6+
methods.
67

78
Objects of these implementing classes can be treated as instances of the interface type, enabling runtime polymorphism
8-
99
and promoting loose coupling in the code.
1010

1111
This code shows an interface Animal with a method makeSound().

0 commit comments

Comments
 (0)