Monday, April 23, 2018

Can we have an abstract class with both abstract and concrete method ?

  1. abstract class MyAbstractExe {
  2. int x = 10;
  3. abstract void run();
  4. void test() {
  5. System.out.println("yes we can have an abstract class with concrete method !!");
  6. }
  7. }
Yes ! we can have an abstract class with both abstract & concrete method. there is no error.

No comments:

Post a Comment

How to run standalone mock server on local laptop

 Please download the standalone wiremock server from Direct download section at the bottom of the page.  Download and installation Feel fre...