Professional Documents
Culture Documents
Note: The above code will get compilation errors due to variant return types.
Interface variable naming conflicts
Case: Two interface containing same variable name
• If a class implements an interface, for each and every method of that interface,
compulsorily, it is must to provide implementation whether it is required or not.
• The above problem can be solved using adapter class discussed next.
Adapter Class
Advantages:
A) Simplifies complexity of the program.
B) Best utility to the programmer for their ease.
Use of Adapter Class in java
Difference between Interface and Abstract class