Add office photos
Engaged Employer

YASH Technologies

3.8
based on 1.6k Reviews
Video summary
Filter interviews by

20+ Protiviti India Member Interview Questions and Answers

Updated 30 May 2024
Popular Designations

Q1. What is GCD? Explain in details

Ans.

GCD stands for Greatest Common Divisor. It is the largest positive integer that divides two or more numbers without leaving a remainder.

  • GCD is used to find the highest common factor between two or more numbers.

  • It is often used in mathematical calculations and algorithms.

  • GCD can be calculated using various methods like Euclidean algorithm or prime factorization.

  • Example: GCD of 12 and 18 is 6, as 6 is the largest number that divides both 12 and 18 without leaving a remainder.

View 2 more answers

Q2. How different microservices communicate with each other

Ans.

Microservices communicate with each other through APIs, message queues, or event-driven architecture.

  • APIs: Microservices can communicate with each other through RESTful APIs or GraphQL.

  • Message queues: Services can use message brokers like RabbitMQ or Kafka to send and receive messages.

  • Event-driven architecture: Services can publish events to a message broker and subscribe to events they are interested in.

  • Service discovery: Services can use tools like Consul or Eureka to disco...read more

Add your answer

Q3. How to handle http requests in Spring Boot

Ans.

Handling http requests in Spring Boot involves creating controller classes, mapping endpoints, and using annotations like @RestController and @RequestMapping.

  • Create a controller class with @RestController annotation

  • Map endpoints using @RequestMapping annotation

  • Use @GetMapping, @PostMapping, @PutMapping, @DeleteMapping annotations for specific HTTP methods

  • Inject dependencies using @Autowired annotation

Add your answer

Q4. Where will be microservices deployed in AWS

Ans.

Microservices can be deployed in AWS using services like ECS, EKS, Lambda, or Fargate.

  • Microservices can be deployed on AWS Elastic Container Service (ECS) for containerized applications.

  • AWS Elastic Kubernetes Service (EKS) can be used for deploying microservices using Kubernetes.

  • Serverless microservices can be deployed using AWS Lambda.

  • AWS Fargate provides serverless compute for containers, allowing for easy deployment of microservices.

Add your answer
Discover Protiviti India Member interview dos and don'ts from real experiences

Q5. how to create primary key through programming

Ans.

Primary key can be created through programming by using SQL commands or ORM frameworks.

  • Use SQL commands like CREATE TABLE to define primary key constraints

  • Use ORM frameworks like Hibernate to define primary key annotations

  • Primary key can be a single column or a combination of columns

  • Primary key ensures uniqueness and helps in faster data retrieval

Add your answer

Q6. How to find duplicate in unsorted array

Ans.

Use a hash set to keep track of seen elements and identify duplicates in an unsorted array of strings.

  • Iterate through the array and add each element to a hash set.

  • If an element is already in the hash set, it is a duplicate.

  • Example: ['apple', 'banana', 'apple', 'orange'] => 'apple' is a duplicate.

Add your answer
Are these interview questions helpful?

Q7. Enum dictionary sets array explain

Ans.

Enum dictionary sets array of strings

  • An enum is a set of named values

  • A dictionary maps keys to values

  • An array is a collection of elements

  • The enum values can be used as keys in the dictionary to map to an array of strings

Add your answer

Q8. Difference between Structure VS class

Ans.

Structures are value types while classes are reference types.

  • Structures are allocated on stack while classes are allocated on heap.

  • Structures do not support inheritance while classes do.

  • Structures cannot have destructors while classes can.

  • Structures are used for small data structures while classes are used for larger, more complex objects.

  • Example of structure: struct Point { int x, y; }

  • Example of class: class Person { string name; int age; }

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is Streams in java8

Ans.

Streams in Java 8 provide a way to process collections of objects in a functional style.

  • Streams allow for functional-style operations on collections, such as map, filter, and reduce.

  • Streams can be sequential or parallel, allowing for efficient processing of large datasets.

  • Streams do not store elements, they are processed on-demand as needed.

  • Example: List names = Arrays.asList("Alice", "Bob", "Charlie"); Stream stream = names.stream();

Add your answer

Q10. How the Hashmap works

Ans.

Hashmap is a data structure that stores key-value pairs and allows for quick retrieval of values based on keys.

  • Hashmap uses a hash function to map keys to indices in an array.

  • Collisions can occur when multiple keys hash to the same index, which can be resolved using techniques like chaining or open addressing.

  • Hashmap provides constant time complexity O(1) for insertion, deletion, and retrieval operations.

  • Example: HashMap map = new HashMap<>(); map.put("key1", 1); int value = ...read more

Add your answer

Q11. Explain Solid principle?

Ans.

SOLID is a set of principles for object-oriented programming to make software more maintainable, scalable, and robust.

  • S - Single Responsibility Principle

  • O - Open-Closed Principle

  • L - Liskov Substitution Principle

  • I - Interface Segregation Principle

  • D - Dependency Inversion Principle

Add your answer

Q12. Explain ARC with example?

Ans.

ARC is Automatic Reference Counting used in iOS to manage memory.

  • ARC is a memory management technique used in iOS development.

  • It automatically manages the memory of objects in an iOS app.

  • ARC keeps track of the number of references to an object and deallocates it when there are no more references.

  • Example: If an object is assigned to a variable, ARC increments the reference count by 1. If the variable is reassigned or goes out of scope, ARC decrements the reference count by 1.

  • A...read more

Add your answer

Q13. Authentication vs Authorization

Ans.

Authentication verifies the identity of a user, while authorization determines what a user can access.

  • Authentication confirms the user's identity through credentials like passwords or biometrics.

  • Authorization determines the user's permissions and access levels to resources.

  • Example: Logging into a system with a username and password is authentication. Being able to view certain files based on your role is authorization.

Add your answer

Q14. Exception handling in spring boot

Ans.

Exception handling in Spring Boot involves using @ControllerAdvice, @ExceptionHandler, and ResponseEntity.

  • Use @ControllerAdvice to define global exception handling for all controllers

  • Use @ExceptionHandler to handle specific exceptions in individual controllers

  • Return ResponseEntity with appropriate status codes and error messages

Add your answer

Q15. In angular how we can pass data parent to child.

Ans.

In Angular, data can be passed from parent to child components using @Input decorator.

  • Use @Input decorator in the child component to receive data from the parent component

  • Define a property in the child component with @Input decorator and assign the value passed from the parent component

  • Parent component should bind the data to the child component using property binding in the template

Add your answer

Q16. diff b/w get and load method in hibernate

Ans.

get() method returns null if the object is not found in the database, while load() method throws an exception.

  • get() method is eager loading while load() method is lazy loading.

  • get() method hits the database immediately while load() method hits the database only when the object is accessed.

  • get() method returns a proxy object while load() method returns a real object.

  • get() method is used when we are not sure if the object exists in the database while load() method is used when ...read more

Add your answer

Q17. Find the 2nd Highest salary using sql query

Ans.

Use SQL query with ORDER BY and LIMIT to find 2nd highest salary.

  • Use SELECT statement to retrieve salary column

  • Use ORDER BY clause to sort salaries in descending order

  • Use LIMIT 1,1 to skip the highest salary and retrieve the 2nd highest salary

Add your answer

Q18. Find the 2nd largest number using Java 8

Ans.

Use Java 8 streams to find the 2nd largest number in an array.

  • Convert the array to a stream using Arrays.stream()

  • Sort the stream in descending order using sorted()

  • Skip the first element (largest number) using skip(1)

  • Find and return the first element of the remaining stream

Add your answer

Q19. Sort the names using Java 8

Ans.

Using Java 8, sort an array of strings containing names.

  • Use the Arrays.sort() method with a lambda expression to sort the array of strings.

  • Example: String[] names = {"Alice", "Bob", "Charlie"}; Arrays.sort(names, (a, b) -> a.compareTo(b));

  • Print the sorted names array to see the result.

Add your answer

Q20. Explain dependency injection.

Ans.

Dependency injection is a design pattern where components are provided with their dependencies rather than creating them internally.

  • Dependency injection helps in achieving loose coupling between components.

  • It allows for easier testing by providing mock dependencies.

  • There are three types of dependency injection: constructor injection, setter injection, and interface injection.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Protiviti India Member

based on 11 interviews
2 Interview rounds
Resume Shortlist Round
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Senior Software Engineer Interview Questions from Similar Companies

3.6
 • 59 Interview Questions
3.3
 • 39 Interview Questions
3.8
 • 28 Interview Questions
4.4
 • 16 Interview Questions
2.8
 • 13 Interview Questions
3.6
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter