J.P. Morgan interview question

Java memory stack explanation. Java Inheritance explanation. Few code solution related approaches