Share
What is the difference between an interface and an abstract class?
Question
can you please help me with this question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Answer ( 1 )
abstract class Animal {
abstract void makeSound(); // Abstract method
void sleep()
{
System.out.println("Sleeping"); } // Concrete method
}
interface Bird
{
void fly(); // Implicitly abstract
}