Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Can we restart a dead thread in java?

0 Answers  


Which access specifier can be used with class ?

0 Answers  


How do you change an int to a string?

0 Answers  


How does access modifiers work?

1 Answers   Wipro,


What is the purpose of the File class?

3 Answers  


Why is java logo a cup of coffee?

0 Answers  


what is the collable collections in java?

2 Answers   Persistent,


Can we have try without catch block?

0 Answers  


What is return data type?

0 Answers  


What are runtime exceptions?

0 Answers  


What is a subsequence of a string?

0 Answers  


difference between java ,c#&java,c++

3 Answers  


Categories