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
How do you stop a thread in java?
What are meta-annotations?
What is java regex?
What is the generic function?
What are the advantages of compiled language?
Can we access the non-final local variable, inside the local inner class?
Is nan false?
What are the types of methodology?
What is the difference between equals() and == in java?
Name and explain the types of ways which are used to pass arguments in any function in java.
Can a class be protected in java?
Can you start a thread twice in Java?
How do you implement tree mirroring in java?
Is there a jre for java 11?
What is ide with example?