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 the purpose of java?

0 Answers  


how many ways to create Thread and which one is good? runnable interface ot Thread class?

3 Answers   Satyam,


Why there are some null interface in JAVA? What does it mean? Give some null interface in JAVA?

0 Answers  


give me the answer of this code class A extnds String This code we can write r not in Java? Explain?

4 Answers  


What is the root class for all Java classes?

8 Answers   IBM, Infosys,


how to compile jsp?

4 Answers   Logica CMG,


What is 'finally' method in Exceptions?

4 Answers  


Can constructor be synchronized?

0 Answers  


What is the main use of java?

0 Answers  


Explain about strings in java?

0 Answers  


What is the life cycle of an Applet ?

1 Answers  


What is size of int in java?

0 Answers  


Categories