Interview Questions - Java Basics
93.
Can main() method be declared final?
Yes, the main() method can be declared final, in addition to being public static.
94.
What is HashMap and Map?
Map is an Interface and Hashmap is the class that implements Map.
95.
Difference between HashMap and HashTable?
The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow).
HashMap does not guarantee that the order of the map will remain constant over time. HashMap is unsynchronized and Hashtable is synchronized.
96.
Difference between Vector and ArrayList?
Vector is synchronized whereas arraylist is not.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers