write a program to create an vector and listeterator.and value
should be enter through keyboard.



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

Post New Answer

More Core Java Interview Questions

What are the advantages of compiled language?

0 Answers  


Why do we need autoboxing in java?

0 Answers  


What are the different types of data structures in java?

0 Answers  


Differentiate between static and non-static methods in java.

0 Answers  


class test { private static void main(String []adsf) { } } explain me that the above code is error or exception

3 Answers  






Explain about doubly linked list

0 Answers   Aditi Placement Service,


waht happens when a return type ,even void is specified for a constructor?

11 Answers  


Can you override private or static method in java?

0 Answers  


What does java stand for?

0 Answers  


What are multiple inheritances?

0 Answers  


What is the use of keywords in java?

0 Answers  


Using callable statement how can you pass out parameters, explain with example?

0 Answers  


Categories