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
What are operators and its types?
Is 0 an even number?
describe synchronization in respect to multithreading? : Java thread
Can java run on google chrome?
What is an inner class in java?
Explain the differences between abstraction and encapsulation?
What do you understand by private, protected and public?
What are the java ide's? Explain
What is function declaration?
Why we cannot override static method?
Why scanner is used in java?
What is bifunction in java?
What is the difference between java applets and applications?
What is palindrome in java?
Can private class be inherited in java?