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 arraylist and listeterator.and
value should be enter through keyboard.

Answer Posted / magreal

public static void main(String[] args) {

String str;
List<String> l = new ArrayList();
int i=0;
boolean more = true;
do{
str = TextIO.getln();
l.add(str);
i++;
TextIO.putln("Add new item ? Y/N");
}while(TextIO.getlnBoolean());

for(String s: l){
TextIO.putln(s);
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the final class modifier?

968


What is a nonetype?

1046


What is a function in programming?

981


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

982


What is a method in coding?

994


What is the use of parseint in java?

965


What is the difference between stringbuffer and stringbuilder class?

1033


Is singleton set an interval?

898


Why use string handling in Java?

989


What is locale?

980


What is a values collection view ?

1030


What are keyboard events?

1094


What is an empirical question?

913


What are the restrictions imposed on method overriding?

960


List the features of java programming language.

971