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

Explain the protected field modifier?

1150


What is tcp ip in java?

1158


What is nested top-level class?

1094


What is pass by value?

1001


How many arguments can a method have java?

1068


What is a treeset class?

1060


Is there any sort function in java?

1102


Are floats faster than doubles?

1143


What are the differences between getting and load method?

1292


What is sorting algorithm in java?

1148


What is boolean law?

1132


Is hashset ordered java?

1155


Can we create a class inside a class in java?

1148


What does 0 mean in boolean?

1021


what type of questions asked for barclays technologies pune please send urgent

5714