Vanenburg
MRR Soft Interview Questions and Answers
Q1. What is the spring boot and java version used in your project?
We are using Spring Boot 2.5.3 and Java 11 in our project.
Spring Boot version: 2.5.3
Java version: 11
Q2. What is factory design patterns and give one example for it
Factory design pattern is a creational pattern that provides an interface for creating objects in a superclass, but allows subclasses to alter the type of objects that will be created.
Factory design pattern is used to create objects without specifying the exact class of object that will be created.
It provides a way to delegate the instantiation logic to child classes.
One example is the Factory Method pattern, where a superclass provides an interface for creating objects, but ...read more
Q3. What is the use of transactional annotation?
Transactional annotation is used in Spring framework to manage transactions in a declarative way.
Transactional annotation is used to define the scope of a single database transaction.
It ensures that if any operation within the transaction fails, the entire transaction is rolled back.
It simplifies the code by handling transaction management automatically.
It can be applied at class level or method level in Spring applications.
Q4. Find the frequency of given character in the given string?
Use a loop to iterate through the string and count the occurrences of the given character.
Iterate through the string using a loop
Check each character if it matches the given character
Increment a counter if a match is found
Return the counter as the frequency of the given character
Q5. Find the second largest number in an given array?
Iterate through the array to find the second largest number.
Iterate through the array and keep track of the largest and second largest numbers.
Compare each element with the largest and second largest numbers to update them accordingly.
Return the second largest number once the iteration is complete.
Q6. Design employee database schema
Design a database schema for an employee database
Create a table for employees with fields like employee_id, name, department, position, etc.
Consider adding tables for departments, positions, and any other related entities
Include relationships between tables using foreign keys
Ensure data integrity with constraints like unique keys and not null constraints
Top Solution Architect Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month