Home » #Collection

#Collection

Collection

51 What is a weak HashMap?An implementation of the map interface, which includes only weak references to the keys. This allows garbage collection when the key is no longer referenced outside of the Map. 52. Why concurrentHashMap is not used over HashMap?This is because it doesn’t perform well in a multithreaded environment. 53. How to […]

Collection Read More »

Collection

41. Explain important methods of LinkedList? Method Description boolean add( Object o) It is used to append the specified element to the end of the LinkedList. boolean contains(Object o) It a method that returns true if this list contains the specified element. void add (int index, Object element) Inserts the element at the specified element

Collection Read More »

Collection

31. What are Vectors in java?The vector is the same as an array. It has components that can be accessed using an index value. Vectors can contain a legacy method that is nor part of the collection framework. 32. What is dictionary class in java?The Dictionary class is a Java class that has a capability

Collection Read More »

Collection

11. Difference between Set and List?List is an ordered collection of elements and hence it maintains insertion order of elements while Set doesn’t maintain any ordering of the elements. List allows duplicate elements while Set doesn’t allow any elements. List is index-based, i.e.we can access elements in List based on Index, whereas we can’t access

Collection Read More »

Interview Preparation

Welcome to our comprehensive guide on Interview Preparation for Spring, Spring Boot, and Java! If you’re preparing for an interview for a Java development position or a role that involves working with Spring and Spring Boot frameworks, you’ve come to the right place. In this page, we will provide you with valuable insights, tips, and

Interview Preparation Read More »

KnownSense Coding

Welcome to KnownSense Coding! You are at the right place. KnownSense Coding is maintained and handled by a group of experienced Software Professional to help students, freshers and experienced associates to gain insights on the latest technologies in the market. It also helps the individual to practice and understand in detail the answers to the

KnownSense Coding Read More »

Scroll to Top