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 |
What is the use of volatile in java?
What is the use of StringTokenizer class?
Explain the concept of polymorphism with examples?
What is api data?
What is widening and narrowing in java? Discuss with an example.
What is 3-tier model?
Name the method that used to clear the buffer ?
What is the difference between the >> and >>> operators?
Is a method a procedure?
What is size of int in java?
What are the fileinputstream and fileoutputstream?
when i write string s1="java"; in one program(application) and string s2="java"; in another application on the same jvm will both objects s2,s2 will refer to same memory location where "java" is stored in string pool.