What is the difference between add() and addElement()
method in Vector Class ?

Answer Posted / sandhya sree malladi

This method is identical in functionality to the add
(Object) method (which is part of the List interface).

add(Object ) is due the fact that Vector implements List
Interface and it is appeared since Java 1.2 when Vector was
moved to Collections: The collection classes from earlier
releases, Vector and Hashtable, have been retrofitted to
implement the collection interfaces.

addElement is "original" Vector's method....

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How are java objects passed to a method and what are native methods?

804


What is difference between word and integer?

795


What is methodological framework?

774


What is skeleton and stub? What is the purpose of those?

762


What is final class?

761


What are the features of junit?

807


What is a default constructor and also define copy contrucyor?

833


Which methods are used during serialization and deserialization process?

723


Is this valid in java ? Can we instantiate interface in java?

738


What package is math in java?

722


Describe string intern() methodology

794


Why stringbuffer is faster than string?

762


What happens if a constructor is declared private?

756


Give example to differentiate between call by value and call by reference.

777


Can inner class extend any class?

802