NoParameterDeclaration.invalid.mj 319 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/**
 * Call without Parameter to Method
 * error: variable a is already defined in method test(int)
 */
class NoParameterDeclaration {


    public static void main(String[] args) {
        /*there is no parameter given here*/
        testObj.test();
    }

    public void test (int i) {
        int a = i;
    }

}