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 hash code collision?
Using callable statement how can you pass out parameters, explain with example?
Explain about the security aspect of java?
What are the differences between this and super keyword?
What is the difference between throw and throws in java?
What is java dot?
When we serialize an object does the serialization mechanism saves its references too?
What is an interoperable application in java ?
Does java vector allow null?
What are the methods of object class ?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Can you have two constructors in java?
Explain, java is compatible with all servers but not all browsers?
Can you override a final method?
Will the jvm load the package twice at runtime?