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

What is function and its uses?

574


Can a class be a super class and a sub-class at the same time? Give example.

803


Is java call by reference?

534


Write a program to print fibonacci series up to count 10.

520


What are the advantages of java over C++?

721






Is it safe to install java on my computer?

544


What does 3 dots mean in java?

524


What is hashing principle in java?

555


What is exception propagation?

594


What is hashing in java?

571


Can a static class have a constructor?

523


Difference between this() and super() in java ?

618


What is floating data type?

541


Can constructor be synchronized?

546


Which class is used by server applications to obtain a port and listen for client requests?

496