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.



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

Answer / 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

More Core Java Interview Questions

what is an anonymous class?

6 Answers   TCS,


How listener identify that the event came from a particular object?

0 Answers  


what is synchronization and why is it important? : Java thread

0 Answers  


What is difference between string and stringbuffer?

0 Answers  


Name the method that is used to set a TextComponent to the read-only state?

1 Answers  


What is a values collection view ?

0 Answers  


Mention some features of java?

0 Answers  


What is difference between public static and void?

0 Answers  


Can we have try block without catch block?

0 Answers  


What are register variables what are the advantages?

0 Answers  


What is abstraction with strong example program? (not a general program)

3 Answers  


what do you mean by stream pipelining in java 8? Explain

0 Answers  


Categories