Predict the output of the following code:public class MyClass extends Test{public static void main(String[] args) {MyClass x = new MyClass();Test y = new MyClass();System.out.println(x.num() + " " + y.num());}public static int num() {return 2;}}class Test{public static int num() {return 5;}}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here