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
Is a boolean variable?
How do you write a conditional statement?
What is the purpose of stub and skeleton?
Can we convert integer to string in java?
What is anti pattern in java?
How do you access command-line arguments within the code?
What is arraylist e in java?
what is object slice?
Does java have extension methods?
What is the difference between Grid and Gridbaglayout?
Explain the difference between intermediate and terminal operations in java8?
Do you need to import math in java?
What is meant by final class?
Why lambda expression is used in java?
How do you write methodology?