Question: Java What is the difference between a class and an interface 1.Classes have fields and methods and interfaces have only methods 2.Classes have only concrete
Java
What is the difference between a class and an interface
| 1.Classes have fields and methods and interfaces have only methods | ||
| 2.Classes have only concrete methods and interfaces have abstract methods | ||
| 3.Classes can have concrete or abstract methods and interfaces have only abstract methods | ||
| 4. You can inherit from classes but not from interfaces |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
