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 meant by vector class, dictionary class, hash table class, and property class?

0 Answers  


What are the traverses in Binary Tree?

2 Answers   Adobe, Infosys,


How will you compute size of a structure?

0 Answers   Amdocs,


Why is prepared Statement, Callable Statement used for? What is the need of Batch updates?

1 Answers   Logica CMG,


Which browsers work with java?

0 Answers  


what is custom tags with example?

3 Answers   Amdocs,


Hi buddy, well i got that there is always a default constructor with abstract class. OK. But why not with interface? Thanks in advance.

2 Answers  


what is life cycle of applet?

9 Answers  


what is the difference between future and callable interface in java?

0 Answers  


What is byte value?

0 Answers  


Which data type is a class in java?

0 Answers  


Suppose there is a System A which gives some output. This output is used as input by system B. The rate at which System A produces is faster than the rate at which system B consumes it. How can you improve this?

1 Answers   RBS,


Categories