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 meant by 'bit masking' in java?
What is the difference between a scrollbar and a scrollpane?
Difference between process and thread?
Is 'null' a keyword?
Detail discussions on JVM, memory management and garbage collector.
Is java jre still free?
Write a function to print Fibonacci series and Tribonacci series?
What is the primary benefit of encapsulation?
Is there any tag in htm to upload and download files?
What is meant by bytecode?
What are the Memory Allocations available in JavaJava?
Explain about assignment statement?