Answer Posted / dsr
import java.util.Collections;
import java.util.LinkedList;
public class LikedListDemo {
public static void main(String[] args) {
LinkedList list = new LinkedList();
list.add("Raju");
list.add("Gopal");
list.add("Senthil");
list.add("nagesh");
System.out.println("list size....."+list.size());
System.out.println("list ....."+list);
Collections.reverse(list);
System.out.println("revese list ....."+list);
}
}
| Is This Answer Correct ? | 8 Yes | 3 No |
Post New Answer View All Answers
What is string [] args?
What is difference between synchronize and concurrent collection in java?
What is an class?
What is module in oop?
Can we have two methods in a class with the same name?
What do you understand by looping in java? Explain the different types of loops.
What is a condition in programming?
what is session in java?
What is methodological theory?
What do the thread?class methods run() and start() do?
Describe method overriding
How does class forname work in java?
What is meant by null and void?
State one difference between a template class and class template.
Is it possible to compare various strings with the help of == operator? What are the risks involved?