Publicis Sapient
10+ Chabria Infotech Interview Questions and Answers
Q1. What is a SSR and CSR website and when to use which one.
SSR and CSR websites refer to server-side rendering and client-side rendering respectively. SSR is used for better initial load performance and SEO, while CSR is suitable for dynamic and interactive content.
SSR (Server-Side Rendering) websites render the web pages on the server and send the fully rendered HTML to the client.
CSR (Client-Side Rendering) websites load a minimal HTML skeleton and then use JavaScript to fetch data and render the content on the client-side.
SSR is b...read more
Q2. How to enhance web performance of a page.
To enhance web performance of a page, optimize images, minify code, reduce server response time, use caching, and enable compression.
Optimize images by compressing them and using appropriate file formats.
Minify code by removing unnecessary characters and whitespace.
Reduce server response time by using a content delivery network (CDN) and optimizing database queries.
Use caching to store frequently accessed data and reduce server requests.
Enable compression to reduce file sizes...read more
Q3. Write Singleton classes Write Rest API Find the repeating character in a string. Variables are inherited or not. Exception Handling Spring AOP Exception handling Completables future
Answering questions related to Singleton classes, Rest API, repeating characters in a string, variable inheritance, and exception handling.
Singleton classes are used to ensure that only one instance of a class is created and provide a global point of access to it.
Rest API is a way of building web services that are lightweight, scalable, and maintainable.
To find the repeating character in a string, we can use a hashmap to store the frequency of each character and then iterate ...read more
Q4. How you handle security in your application?
I handle security in my application by implementing encryption, access controls, regular security audits, and staying updated on security best practices.
Implement encryption for sensitive data to protect it from unauthorized access
Use access controls to restrict user permissions and limit exposure of sensitive information
Conduct regular security audits to identify and address vulnerabilities
Stay updated on security best practices and implement necessary measures to enhance se...read more
Q5. how does singleton pattern is used in spring. how do you connect the database in spring
Singleton pattern in Spring ensures that a class has only one instance and provides a global point of access to it.
In Spring, singleton pattern is used by default for all beans created through the Spring container.
This means that by default, Spring beans are singletons and only one instance is created and shared throughout the application.
To connect to a database in Spring, you can use the JDBC template or ORM frameworks like Hibernate.
You can configure the database connectio...read more
Q6. How can we make a class immutable?
To make a class immutable, we can use final keyword for class, fields, and methods, make fields private, and avoid setters.
Use final keyword for class to prevent inheritance
Make fields private to restrict direct access
Avoid providing setter methods for fields
If fields are mutable objects, return a copy of the object instead of the original
Q7. Design patterns you have used in your project.
I have used the Singleton, Factory, and Observer design patterns in my project.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Factory pattern creates objects without specifying the exact class of object that will be created.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Q8. how does hashmap works internally
HashMap works internally by using a hash function to map keys to their corresponding values in an array of linked lists.
HashMap uses a hash function to determine the index of the array where the key-value pair will be stored.
In case of hash collisions, where multiple keys map to the same index, a linked list is used to store multiple entries at that index.
When retrieving a value, the hash function is used to find the correct index and then the linked list is searched for the ...read more
Q9. Difference between monolithic and microservices?
Monolithic architecture is a single unified unit, while microservices architecture breaks down the application into smaller, independent services.
Monolithic architecture is a single, indivisible unit where all components are interconnected and interdependent.
Microservices architecture breaks down the application into smaller, independent services that communicate with each other through APIs.
Monolithic applications are typically easier to develop and test, but can be harder t...read more
Q10. How you manage pressure
I manage pressure by prioritizing tasks, staying organized, taking breaks, and seeking support when needed.
Prioritize tasks based on deadlines and importance
Stay organized with to-do lists and calendars
Take breaks to recharge and avoid burnout
Seek support from colleagues or supervisors when feeling overwhelmed
Q11. Internal working of a hashmap
A hashmap is a data structure that allows for efficient retrieval of values based on their associated keys.
A hashmap uses a hash function to convert keys into array indices.
Collisions can occur when multiple keys hash to the same index.
To handle collisions, a hashmap typically uses linked lists or other data structures to store multiple values at the same index.
When retrieving a value, the hashmap uses the hash function to find the corresponding index and then searches the li...read more
Q12. Memory manaagement in java.
Memory management in Java involves automatic memory allocation and garbage collection.
Java uses automatic memory management through garbage collection to allocate and deallocate memory.
Memory is divided into stack and heap. Stack stores primitive types and references to objects, while heap stores objects.
Garbage collection in Java identifies and removes objects that are no longer needed, freeing up memory for new objects.
Developers can manually manage memory using features li...read more
Interview Process at Chabria Infotech
Reviews
Interviews
Salaries
Users/Month