Morgan Stanley Interview Question

Tell me about your current project Difference between method overloading and method overriding Can I override private method Abstraction vs interface Can we write implementation of few methods only in case some class is implementing particular interface Tell me about final <class, method , variable> As you said if value of final method can not be changed then what will happen in following case : final Person p = new person ("ABC", 24); p.setAge(25); If above code runs properly with updated age Why it is proper ? Tell me about Exception handling? In discussion asked for example for each answer .. where in Ur project have u used this ... When should I throw runtime custom exception and and when should throw checked exception How u create custom exception What is need to create custom exception Example Do u know how does exception handling work in case of inheritance If parent class has a method declared as follows: Public string method1()throws IOException{..} Then can I override this method as follows: Public string method1()throws Exception{..} No then why What about vice-versa Which collections have u used in Ur project What is arraylist Do you know the how arraylist internally work What is array Difference between array and arraylist The discussion went around significance When would I use which list or array ..doubly linked list , linked list Told about internal implementation of linked list .. doubly linked list and so on . Internal Working of hashmap Hashing and equal methods were focus points Relationship between hashing and equal method If two objects have same hash code , then is it necessary that they are actually equal And vice-versa Played around this question If I want to create a map of custom object vs string Map<Person, String> Then what I need to include in class person , how should I write the class Other than providing equal and hash function what else is required Is it ok if class person is mutable? Write a immutable class Given a string sentence get the duplicate words from it