Question: What will the above code print? I was thinking that st.x would be 3 since x is a member variable. But its not. Can someone please help me understand why? TIA.
only instance methods are overridden , variables are never overridden. the st is superb type variable so it gets the value of x in superb class. it does not check what instance is in st variable.