what is hashmap& hashtable with example?

Answer Posted / siva kumar g.

Both are collection of objects.
Both are used to store the key , value pairs.
Hashtable is synchronized where as Hashmap is not.
Hashtable does't allow the null values.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does apple use java?

498


What is an object’s lock and which object’s have locks?

509


What is boolean false?

531


Why is method overloading not possible by changing the return type in java?

597


What are the different access modifiers available in java?

563






What types of index data structures can you have in java?

616


Is java platform independent?

572


What is method and methodology?

608


What is a buffer in computer?

516


For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path.

1585


Is null a keyword in java?

559


What is comparable and comparator interface? List their differences

583


What is Gang of four design patterns

596


Can I uninstall java?

555


What are different types of control structures?

495