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 |
what is an anonymous class?
How listener identify that the event came from a particular object?
what is synchronization and why is it important? : Java thread
What is difference between string and stringbuffer?
Name the method that is used to set a TextComponent to the read-only state?
What is a values collection view ?
Mention some features of java?
What is difference between public static and void?
Can we have try block without catch block?
What are register variables what are the advantages?
What is abstraction with strong example program? (not a general program)
what do you mean by stream pipelining in java 8? Explain