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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!