- interface MyInterfaceExe {
- // Any number of final, static fields / variables
- int x = 10;
- // is equivalent to final static int x = 10;
- String s = "ishaan";
- // is equivalent to final static String s = "ishaan";
- }
Note: The default nature of an interface field's / variable's is public final static.
No comments:
Post a Comment