Which of the following syntax are correct ?a. LinkedList<Integer> l=new LinkedList<int>();b. List<Integer> l=new LinkedList<int>();c. LinkedList<Integer> l=new LinkedList<Integer>();d. List<Integer> l = new LinkedList<Integer>();
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers

 Q1. Which of the following syntax are correct ?a. LinkedList<Integer> l=new LinkedList<int>();b. List<Integer> l=new LinkedList<int>();c. LinkedList<Integer> l=new LinkedList<Integer>();d. List<Integer> l = new LinkedList<Integer>();Core Java
Ans. All are correct.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   generics   linkedlist   list   collections      basic


Related Questions

  What is the difference between ArrayList and LinkedList ?
 If you are given a choice to use either ArrayList and LinkedList, Which one would you use and Why ?
  Will this code give error if i try to add two heterogeneous elements in the arraylist. ? and Why ?
 In a Linked list with sorted numbers, insert a new numbers while maintaining the sort order.
 Collections.sort can only be performed on ..

a. Set
b. List
c. Map
d. Any Collection implementation
 Is this a valid initialization ? Explain.

Collection<Collection> collection = new LinkedList<LinkedList>();
  What is the difference between List, Set and Map ?

or

What are the different Java Collections Interfaces ?
  Difference between Vector and ArrayList ?
  Overridden methods must have the same ...
  Which of the following doesn't extend Collection interface ?



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: