Nuclei
Tribe21 Consultancy Services Interview Questions and Answers
Q1. What is the difference between Spring singletone ans java singletone ?
The main difference is that Spring singleton is managed by the Spring container, while Java singleton is managed by the developer.
Spring singleton is created and managed by the Spring container, while Java singleton is created and managed by the developer.
Spring singleton is a design pattern used in Spring framework to create a single instance of a class, while Java singleton is a design pattern used in Java to create a single instance of a class.
Spring singleton is thread-sa...read more
Q2. what are spring bean scope ?
Spring bean scope defines the lifecycle and visibility of a bean in the Spring container.
Singleton scope: Only one instance of the bean is created and shared across the application.
Prototype scope: A new instance of the bean is created every time it is requested.
Request scope: A new instance of the bean is created for each HTTP request.
Session scope: A new instance of the bean is created for each HTTP session.
Global session scope: Similar to session scope, but for global HTTP...read more
Q3. explain internal working of hashmap?
HashMap is a data structure that stores key-value pairs and uses hashing to provide constant time complexity for basic operations.
HashMap internally uses an array of linked lists called buckets to store the key-value pairs.
When a key-value pair is added, the hash code of the key is computed and used to determine the index of the bucket.
If multiple key-value pairs have the same hash code, they are stored as a linked list in the same bucket.
To retrieve a value, the hash code of...read more
Q4. Singletone is Thread Safe?
No
Singleton is not inherently thread-safe
Multiple threads can access and modify the singleton instance simultaneously
To make it thread-safe, synchronization or double-checked locking can be used
Alternatively, an enum implementation of singleton is inherently thread-safe
Q5. custom implementatoion of optional
Q6. differentiate class and struct
Q7. optionals in iOS
Top HR Questions asked in Tribe21 Consultancy Services
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month