All the statements are equal because inside an interface a variable declared will be public static final by default
In argument[0] = args;, the reference variable arg[0], which was referring to an array with two elements, is reassigned to an array (args) with three elements.
Output:
$ javac main_arguments.java
$ java main_arguments
1 2 3
They should be initialized during the time of declaration itself otherwise it is a compilation eror
Inside an interface every method will be by default abstract and public
:: is the scope resolution operator
Multiple inheritance is not supported directly but it is achieved through the concept of Interface
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.