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.

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


Please Help Members By Posting Answers For Below Questions

Why do we use string?

972


Is ++ operator thread-safe in java?

1104


What are the important features of Java 10 release?

955


Why we do exception handling in java and how many types of exceptions are there?

1048


Can an interface be final?

975


What does string [] args mean?

955


Why pointers are not used in java?

1053


What happens when I use / and % with a negative numerator?

998


How many types of parsers are there?

962


Give few examples of final classes defined in Java API?

1116


What are the differences between heap and stack memory?

1023


What is use of a abstract variable?

927


What is fail first in java?

1083


What access modifiers can be used for class ?

975


Is oracle charging for java?

972