1. Difference between ArrayList and LinkedList. Why search in ArrayList is faster than in LL. When to use what
Ans : Array List is implemented as an Array and since arrayList is indexed, we just need to go to array+i th position directly. We do not have to traverse the whole list as in case of LL
2. HashCode and Equals contract
3. Difference between HashTable and HashMap
(If have inserted lakhs of objects in a HashTable and these threads simultaneously want to access a method(lets say equals() method)... one thread will accquire lock on the method, so others will have to wait. This will be a performance hit.
This is the reason why HashMap (not synchronised) came into picture. HashTable is legacy datastructure.
4. Difference between IOC and Dependency Injection
5. Difference between Error and Exception. Are all Errors Irrecoverable. (Think about NoClassDefFoundError)
1 comment:
very Helpful !!
Post a Comment