Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Online Practice Test
>
Java
« Previous
Next »
Which statement is true?
Options
- HashTable is a sub class of Dictionary
- ArrayList is a sub class of Vector
- LinkedList is a subclass of ArrayList
- Vector is a subclass of Stack
CORRECT ANSWER : HashTable is a sub class of Dictionary
Discussion Board
explanation
plz explain more..
snehal chavan 04-5-2017 04:26 AM
i hope that i have done best
Nice
Madhavi 09-9-2016 12:23 PM
Hashtable subclass of dictionary
Hashtable uses put() and get() to add and retrieve key and value pairs. Hashtable allows hiding of key-value pairs. It keeps an array of key/value pairs. Whenever a new key/value pair is added in the table then it is added in the array at an index which is calculated by the hashcode of the key. If at that point of time key/value pair exists at that index then the new pair will be linked to the existing key/value pair. So, it can be said that it is a structured way to represent linked list. Dictionary class is the abstract parent class for hashtable which is used to map keys to values.
Therefore hashtable class is a concrete subclass of dictionary that build the complete table of key/value pairs. For example:
public class java.util.Hashtable extends java.util.Dictionary
implements java.lang.Cloneable, java.io.Serializable{
//statements...
}
Rohit Sharma 07-29-2014 01:41 AM
link between hashtable and Dictionary
Can You please explain how "Hashtable" is a subclass of "Dictionary" along with one Example.
Soujanya D 12-13-2013 10:23 AM
« Previous
Next »
Write your comments
*
*
Email must be in the form someone@domain.com
*
*
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
Related Content
Java Beginner (11)
Java (39)
Java (40)
Java (22)
Java (30)
Java (25)
Java (20)
Java (20)
Core Java (20)
Core Java (10)
Core Java (72)
EJB (20)
JDBC (20)
Applet (20)
Struts (21)
Servlets (20)
Java Web Services (20)
Javascript (40)
J2EE (10)
jQuery (46)
Advertisement
▲