write a program to create an vector and listeterator.and value
should be enter through keyboard.
Answer Posted / magreal
public static void main(String[] args) {
String str;
Vector<String> v = new Vector<String>();
do{
str = TextIO.getln();
v.add(str);
TextIO.putln("Add the item ? Y/N");
}while(TextIO.getlnBoolean());
for(String s: v){
TextIO.putln(s);
}
}
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
Why are the destructors for base class and derived class called in reverse order when the program exits
What is size () in java?
What are constants and how to create constants in java?
Does sprintf allocate memory?
Differentiate between overriding and overloading cases?
Is 0 true or is 1 true?
What is update method called?
Which is fastest collection in java?
What one should take care of, while serializing the object?
Which is better stringbuilder or stringbuffer?
How many bits is a boolean?
What is a line break?
What are alternatives to java serialization?
How many bytes is a char in java?
What are measurable parameters?