You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vector and Hashtable are legacy code. They are not deprecated but in most cases they can be replaced with other subclasses of List and Map that are better for the job.
Vector and Hashtable are synchronized, but most of the time we don't need synchronization (or already synchronized somewhere else), so using ArrayList or HashMap could improve the performance. If we need to add/remove the elements in a list many times we can use a LinkedList with small performance penalty. If we need to maintain the order of elements in a map we can use LinkedHashMap.
The text was updated successfully, but these errors were encountered:
This issue was migrated from Pagure Issue #198. Originally filed by edewata (@edewata) on 2012-06-01 21:31:04:
Vector and Hashtable are legacy code. They are not deprecated but in most cases they can be replaced with other subclasses of List and Map that are better for the job.
Vector and Hashtable are synchronized, but most of the time we don't need synchronization (or already synchronized somewhere else), so using ArrayList or HashMap could improve the performance. If we need to add/remove the elements in a list many times we can use a LinkedList with small performance penalty. If we need to maintain the order of elements in a map we can use LinkedHashMap.
The text was updated successfully, but these errors were encountered: