Create a class "VecObj" . Create a
vector and populate it with the integer objects using
the add(object) method.
Here is the Code of the Example :
VecObj.java:
import java.util.*;
|
Here is the Output of the Example :
| C:\roseindia>javac VecObj.java
C:\roseindia>java VecObj |
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Insert an object with the add(Object) method
Post your Comment