What, if anything, is wrong with the following code?
public abstract class Main { transient int j; synchronized int k; final void Main() { }/*from ww w . java 2 s . c om*/ static void f() { k = j++; } public static void main() { } }
Select 2 options
Correct Options are : C E
After adding a return type, the method cannot be a constructor.
The constructors are not inherited, and so it doesn't make sense to mark them as final.
It is illegal to mark a constructor as final.
So there is no question of overriding them.
Static methods cannot refer to non-static/instance members.