in core-java how Can an abstract class have static methods?

Yes, definitely can have as a static method is special flavor of concrete method. We know a static method can be called with object name (not possible here), class name and directly without the help of an object. Following program explains.
abstract class Test
  public static void display()
    System.out.println("Hello 1");
public class Demo extends Test
  public static void main(String args[]) 
In the above code, the display() method is declared static. It is called in the subclass directly and with abstract class name.

asked Sep 13, 2013 in Core java by itkbc
edited Sep 12, 2013
0 votes

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.