Mphasis interview question

oops with Java Basic Programs