Skip to main content

Collection Interview Question || Top 10 interview Question in collection topic in java

                        Collection Interview Question

 The collection is a very important topic in the interview. interviewer asking so many questions about the collection. when I am giving interviews asking related to the topic. so I am referring to you please start questing about the collection topic.
In this section, I am collecting lots of topmost important questions related to the collection topic.


  • Why collection is important?                                                                                                          - > The collection is a framework it is not a concept the real use of collectin is available so that interview asking so many times about the collection in java. we can take any project collection is available. without collection, you can't do java project.    that's why the collection is a very important topic in java.
  •   What is the use of collection?                                                                                                             ->The collection is used to store homogenous, Heterogeneous, unique, and duplicates values. It means that you have used this collection in your program to store the object and pass this object in other modules and package classes. so finally we can say that collection is used to pass the object in one class to another class easily.  

  • Some Very important Question in Collection?  

      1. What are Collection related features in Java 8?


      2. What is the Java Collections Framework? List out some benefits of the Collections framework?

      3. What is the benefit of Generics in the Collections Framework?

      4. What are the basic interfaces of the Java Collections Framework?

       5. Why Collection doesn’t extend Cloneable and Serializable interfaces?

       6. Why Map interface doesn’t extend Collection interface?

       7. What is an Iterator?

        8. What is the difference between Enumeration and Iterator interface?

       9. Why there is no method like Iterator.add() to add elements to the collection?

     10. Why Iterator doesn’t have a method to get the next element directly without moving the cursor?

       11. Can we use any class as Map key?

      12. What are the different Collection views provided by Map interface?

       13. What is the difference between HashMap and Hashtable?

       14. How to decide between HashMap and TreeMap?

     15. What are the similarities and differences between ArrayList and Vector?

      16. What is the difference between Array and ArrayList? When will you use Array over                            ArrayList?

       17. What is the difference between ArrayList and LinkedList?

       18. Which collection classes provide random access to its elements?

        19. What is EnumSet?

       20. Which collection classes are thread-safe?

       21. What are concurrent Collection Classes?  

  • What is memory digram of ArrayList Object?   
     It is the internal memory digram of collection framework like ArrayList Class If you see this in this section you find how to Student objects are store in ArrayList and pass this object to other classes. ArrayList is implemented by List interface so that its behavior is storing the heterogeneous type of data stored in the program.
Memory Diagram Of collection in java
 
 
  • What is the ArrayList and  LinkedList?
       It is very important concept in java. If you want to learn java then don't forget to learn. Because the collection is very important for everyone.
ArrayList class




HashMap and LinkedHashMap

Comments

Popular posts from this blog

#logicalcoding Write a program to print 1 to 100 number in java | Logic...

Write a program to print 1 to 100 number in java. If you want to become a part of step-by-step to become a logical programmer. Then this video and website for you. So join this website and my youtube channel and become a part of this event. I am going to discuss Java programming in java. become a java logical programmer in java. Software having knowledge about this logic and standard coding practice of these videos. How to become a logical programmer series. Question 3: Write a program to print 1 to 100 number in java. Take one value from the user and print the 1 to n number natural number in java. Code:     import java.util.Scanner; class Numberp  { public static void main(String[] args)  { Scanner sc=new Scanner(System.in); //System.out.println("Enter the Number:");don't used int n=sc.nextInt(); //Validate -ve,+ve,0 if(n<1){ System.out.println("Please enter Valid Number"); System.exit(0); } for(int i=1;i<=n...

Top 100 Logical Question in java | Written test exam question | Logical programming question paper in java to crack the written test exam.

                                  The written  test exam question     If you want to crack the written test exam like TCS , INFOSYS , and WIPRO than you want these questions. this question is very useful for you if you are in college. before any drive for MNC  company you are readily forgiven the exam of this company so, this is for you. This question is very useful for developing logical skills in the programming language. If you want to become a good logical and standard coder than definitely this video for you don't miss this question. As you know logic is the power of the world if you have logic you can solve and find the solution to any type of problem. So, just focus on the logic noting else.         List of Question :       1. Write a Java program to print 'Hello' on screen and then print your name on a separate line. ...

How to earn money online | without investing the money

" How to earn money  online " this is my personal experience. I am going to tell you how you can earn money online. I am not talking about those people who don't have passion, dedication, and education. I am going to talk about those people who want to become a good self employee and who want to earn money online. so, let's start now...         Earn money How you can earn money online ?   This question you have to ask with yourself which area/field you have the interest to become good. for example writing, reading, learning, coding, programming, dancing, singing, cooking, walking, teaching... like so many examples I have, I can so many things about this opportunity. take this anyone of this to become a good than making money online. I am going to teach you how you can do this very easily. How you can achieve this skill . In this world whatever you want to achieve you can achieve no one can stop you, but you have to promise yourself to do ...