write a program to create an vector and listeterator.and value
should be enter through keyboard.
Answer / 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 |
Can we restart a dead thread in java?
Which access specifier can be used with class ?
How do you change an int to a string?
How does access modifiers work?
What is the purpose of the File class?
Why is java logo a cup of coffee?
what is the collable collections in java?
Can we have try without catch block?
What is return data type?
What are runtime exceptions?
What is a subsequence of a string?
difference between java ,c#&java,c++