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
Can we able to pass objects as an arguments in java?
What is the use of optional ?
When is update method called?
What are the properties of thread?
Can we change the scope of the overridden method in the subclass?
What is void class in java?
Is a method a procedure?
What do you mean by formatting?
Explain spliterator in java8?
What is parameter example?
Which class is the superclass for all the classes?
Do I need java for windows 10?
Is set thread safe java?
What is boolean keyword in java?
What are Normalization Rules? Define Normalization?