Answers for "can abstract class have private methods in abstract class in java"

0

can abstract method be protected, default, private

In abstract classes, abstract methods can be public, protected, or default. 
 It cannot be private.
Posted by: Guest on November-28-2020
0

can abstract class have non abstract methods in java

abstract class AbstractDemo { // Abstract class
   private int i = 0;
   public void display() { // non-abstract method
      System.out.print("Welcome to Tutorials Point");
   }
}
public class InheritedClassDemo extends AbstractDemo {
   public static void main(String args[]) {
      AbstractDemo demo = new InheritedClassDemo();
      demo.display();
   }
}
Posted by: Guest on November-10-2020

Code answers related to "can abstract class have private methods in abstract class in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language