Monday, April 23, 2018

What is the default modifier of field / variable in an interface ?

  1. interface MyInterfaceExe {
  2. // Any number of final, static fields / variables
  3. int x = 10;
  4. // is equivalent to final static int x  = 10;
  5. String s = "ishaan";
  6. // is equivalent to final static String s = "ishaan";
  7. }
Note: The default nature of an interface field's / variable's  is public final static.

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