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 static methods access instance variables in java?
What are the six ways to use this keyword?
what is the difference b/w static and final methods?
What is difference between core java and java ee?
What is main string [] args?
Is set sorted in java?
What is difference between Eclips and MyEclips?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
Why transient variables wont participate in serialization?
what is custom tags with example?
How can we access some class in another class in java?
What do you understand by copy constructor in java?