Answers for "can abstract class have implementation java"

1

how to use an abstract class in java

interface methods{
    public void hey();
    public void bye();
}

//unable to implement all the abstract methods in the interface so 
// the other class automatically becomes abstract
abstract class other implements methods{
    public void hey(){
        System.out.println("Hey");
    }
}

//able to implement all the methods so is not abstract
class scratch implements methods {
    public void hey(){
        System.out.println("Hey");
    }
    public void bye() {
        System.out.println("Hey");
    }
}
Posted by: Guest on January-08-2020
1

abstract classes and interfaces in java

abstract class have no implementation of methods functions inside it. the classes which extending abstract class have to implement it
Posted by: Guest on December-30-2020
-2

can abstract class have implementation java

abstract classes have no implementation of functions methods inside it which declared as abstract methods. classes which are inheriting it have to overriden it. and final absract class can not be overriden
Posted by: Guest on December-30-2020

Code answers related to "can abstract class have implementation java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language