Monday, April 23, 2018

Can we create the object of an abstract class ?

  1. abstract public class MyAbstractExe {
  2. MyAbstractExe exe = new MyAbstractExe();
  3. }

No ! we can not create the object / instance of an abstract class. Compiler will give an error at line 2 saying cannot instantiate the type MyAbstractExe 

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...