What will happen as a result of the following code?

class A {}
class B extends A {}

public class Test { 
    static public  void main(String args[]) {
        B b = new B();
        A a = b;
        if (a.hashCode() == b.hashCode())

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Java quizzes
Sign Up Now
or Subscribe for future quizzes