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 do we use string?
Is ++ operator thread-safe in java?
What are the important features of Java 10 release?
Why we do exception handling in java and how many types of exceptions are there?
Can an interface be final?
What does string [] args mean?
Why pointers are not used in java?
What happens when I use / and % with a negative numerator?
How many types of parsers are there?
Give few examples of final classes defined in Java API?
What are the differences between heap and stack memory?
What is use of a abstract variable?
What is fail first in java?
What access modifiers can be used for class ?
Is oracle charging for java?