List VS Set List has duplicate – No duplicates allowed in set
HashMap VS HashTable HashMap is not threadsafe and not synchronized - HashTable is threadsafe and syncronized HashMap is fast - HashTable is not as fast as HashMap Concurrent HashMap is thread safe
HashMap VS HashSet HashMap can allow duplicate values - HashSet do not allow duplicates HashMap is Fast - HashSet is Slow HaspMap has Key - Value Pair - HashSet has values alone
Comparator VS Comparable Comparator is used for Object attribute comparison - Comparable is used for object comparison Compare() - CompareTo()
Array List VS Vector Array List is not synchronized – Vector is synchronized Array List is not a legacy class – Vector is a legacy class Array List increases by 50% of its size – Vector increases by doubling its size
Serialization To ensure that the same object is transferred over the network we use serailization Same serial UID should be used in server and client else u get invalid class error
3 JDBC Statements Statement – query compiled each time PreparedStatement – query compiled only once CallableStatement – execute stored procedures and functions
Transaction Management Connection interface provides commit(), rollback() etc.
getHashCode() Used to get unique code to store in Hashmap
No comments:
Post a Comment