Add office photos
Engaged Employer

Hughes Systique Corporation

3.9
based on 234 Reviews
Filter interviews by

20+ Kalimati Global Shared Services Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. 1. What are the advantages of Microservices?

Ans.

Microservices offer advantages such as scalability, flexibility, and easier maintenance.

  • Scalability: Microservices allow for individual components to be scaled independently, making it easier to handle high traffic.

  • Flexibility: Microservices can be developed and deployed independently, allowing for faster development and deployment cycles.

  • Easier maintenance: Microservices are smaller and more focused, making it easier to identify and fix issues.

  • Example: Netflix uses microserv...read more

Add your answer

Q2. 5. Write a program to get the middle of the linked list in a single iteration? Ans - Two pointers , slow fast

Ans.

Program to get the middle of a linked list in a single iteration using two pointers.

  • Use two pointers, slow and fast, to traverse the linked list

  • Move slow pointer one step at a time and fast pointer two steps at a time

  • When fast pointer reaches the end, slow pointer will be at the middle node

Add your answer

Q3. 8. Singleton in java . And how singleton can be broken

Ans.

Singleton is a design pattern that restricts the instantiation of a class to one object.

  • Singleton pattern is used when we need to ensure that only one instance of a class is created and used throughout the application.

  • To implement Singleton, we make the constructor private and provide a static method to get the instance of the class.

  • Singleton can be broken by using reflection, serialization, and cloning.

  • Reflection can be used to access the private constructor and create a new...read more

Add your answer

Q4. 12. How to switch from one branch to other in git?

Ans.

To switch from one branch to another in git, use the 'git checkout' command.

  • Use 'git checkout' followed by the name of the branch you want to switch to.

  • Make sure to commit or stash any changes before switching branches.

  • Example: 'git checkout new-branch'

Add your answer
Discover Kalimati Global Shared Services interview dos and don'ts from real experiences

Q5. 11. Why do we need maven clean and install?

Ans.

Maven clean removes target directory and install compiles and packages the project

  • Maven clean removes the target directory and all the compiled classes and resources

  • Maven install compiles and packages the project and installs the resulting artifact into the local repository

  • Maven clean and install together ensure that the project is built from scratch and all dependencies are resolved

  • Useful when there are changes in the project dependencies or configuration

Add your answer

Q6. 1. How do you secure your APIs?

Ans.

APIs can be secured using various methods such as authentication, encryption, rate limiting, and input validation.

  • Implement authentication using OAuth or JWT

  • Use HTTPS encryption to protect data in transit

  • Implement rate limiting to prevent DDoS attacks

  • Validate input data to prevent injection attacks

  • Regularly update and patch software to prevent vulnerabilities

Add your answer
Are these interview questions helpful?

Q7. 2. What is deadlock? How to resolve it?

Ans.

Deadlock is a situation where two or more threads are blocked and waiting for each other to release resources.

  • Deadlock occurs when two or more threads are waiting for each other to release resources.

  • It can be resolved by using techniques like resource allocation graph, timeout, and prevention.

  • Prevention can be done by avoiding circular wait, hold and wait, and no preemption.

  • Example: Thread A holds resource X and waits for resource Y, while Thread B holds resource Y and waits ...read more

Add your answer

Q8. 4. What is future object in java?

Ans.

A Future object represents the result of an asynchronous computation in Java.

  • Future objects are used to retrieve the result of an asynchronous computation when it becomes available.

  • They provide a way to check if the computation is complete, cancel the computation, and retrieve the result.

  • They are commonly used in multithreaded programming and in Java's Executor framework.

  • Example: Future future = executor.submit(new Callable() { public Integer call() { return 42; }});

  • Example: ...read more

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

Q9. 3. How hashmap internally works?

Ans.

HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.

  • HashMap uses hashing to store and retrieve values quickly

  • It uses an array of buckets to store key-value pairs

  • The hash code of the key is used to determine the bucket where the key-value pair is stored

  • If two keys have the same hash code, they are stored in the same bucket as a linked list

  • When retrieving a value, the hash code of the key is used to find the bucket and then the li...read more

Add your answer

Q10. 3. What is spring filter ?

Ans.

Spring filter is an interface used to intercept HTTP requests and responses.

  • Spring filter is used to perform tasks such as logging, security, and caching.

  • It can be used to modify the request or response before it reaches the controller.

  • Examples of Spring filters include CharacterEncodingFilter, CorsFilter, and CsrfFilter.

Add your answer

Q11. 9. What is @SpringBootApplication?

Ans.

A convenience annotation that combines @Configuration, @EnableAutoConfiguration, and @ComponentScan.

  • Used to bootstrap a Spring Boot application.

  • Automatically configures the Spring application based on the dependencies added to the classpath.

  • Scans the package and its sub-packages for components and services.

  • Example: @SpringBootApplication public class MyApplication { public static void main(String[] args) { SpringApplication.run(MyApplication.class, args); } }

Add your answer

Q12. 2. What are the disadvantages?

Ans.

Disadvantages of what? Please specify.

    Add your answer

    Q13. 6. Save vs Persist in hibernate ?

    Ans.

    Save() method inserts a new record into the database, while persist() method can also be used to update an existing record.

    • save() method is used to insert a new record into the database

    • persist() method can also be used to insert a new record, but it can also be used to update an existing record

    • save() method returns the generated ID immediately, while persist() method does not

    • save() method can be called outside of a transaction, while persist() method must be called within a t...read more

    Add your answer

    Q14. 5. Lifecycle of object in hibernate ?

    Ans.

    Hibernate manages object lifecycle through three states: transient, persistent, and detached.

    • When an object is created, it is in the transient state.

    • When the object is saved using session.save() method, it becomes persistent.

    • When the session is closed or the object is explicitly detached using session.evict() method, it becomes detached.

    • Detached objects can be re-attached to a new session using session.update() or session.merge() methods.

    • Objects can also be deleted using sess...read more

    Add your answer

    Q15. 7. Merge intervals problem in java

    Ans.

    Merge overlapping intervals in Java

    • Sort the intervals based on their start time

    • Iterate through the intervals and merge overlapping ones

    • Use a stack to keep track of merged intervals

    Add your answer

    Q16. 6. Stack peek vs Stack pop?

    Ans.

    Stack peek returns the top element without removing it, while stack pop removes and returns the top element.

    • Stack peek is used to check the top element of the stack without removing it.

    • Stack pop is used to remove and return the top element of the stack.

    • Both methods operate on the top element of the stack.

    Add your answer

    Q17. 7. RequestMapping vs Postmapping?

    Ans.

    RequestMapping is used for all HTTP methods while PostMapping is specifically for POST requests.

    • RequestMapping is a general-purpose annotation for mapping HTTP requests to handler methods.

    • PostMapping is a specialized version of RequestMapping that only maps POST requests.

    • RequestMapping can be used for GET, POST, PUT, DELETE, and other HTTP methods.

    • PostMapping is useful when you want to handle only POST requests and ignore other HTTP methods.

    • Example: @RequestMapping(value = "/...read more

    Add your answer

    Q18. 10. RestController vs Controller?

    Ans.

    RestController is used for RESTful web services while Controller is used for traditional web applications.

    • RestController returns data in JSON or XML format while Controller returns data in HTML format.

    • RestController uses @RestController annotation while Controller uses @Controller annotation.

    • RestController is used for building RESTful web services while Controller is used for building traditional web applications.

    • RestController is a specialized version of Controller in Spring...read more

    Add your answer

    Q19. 4.Linked list Vs Arraylist

    Ans.

    Linked list is dynamic and efficient for insertion/deletion, while ArrayList is faster for random access.

    • Linked list uses pointers to connect nodes, while ArrayList uses an underlying array.

    • Linked list is better for frequent insertion/deletion, while ArrayList is better for frequent random access.

    • Linked list has O(1) time complexity for insertion/deletion, while ArrayList has O(n) time complexity.

    • Example: Linked list is used in implementing stacks, queues, and hash tables, wh...read more

    Add your answer

    Q20. 8. Scopes of bean ?

    Ans.

    Scopes of bean refer to the visibility and lifecycle of a bean in a Spring application.

    • There are four scopes of bean in Spring: singleton, prototype, request, and session.

    • Singleton scope creates only one instance of a bean and is the default scope.

    • Prototype scope creates a new instance of a bean every time it is requested.

    • Request scope creates a new instance of a bean for each HTTP request.

    • Session scope creates a new instance of a bean for each HTTP session.

    • Scopes can be defi...read more

    Add your answer
    Contribute & help others!
    Write a review
    Share interview
    Contribute salary
    Add office photos
    Interview Tips & Stories
    Ace your next interview with expert advice and inspiring stories

    Top Java Developer Interview Questions from Similar Companies

    3.7
     • 156 Interview Questions
    3.9
     • 41 Interview Questions
    3.8
     • 21 Interview Questions
    3.9
     • 17 Interview Questions
    4.0
     • 14 Interview Questions
    3.9
     • 13 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
    70 Lakh+

    Reviews

    5 Lakh+

    Interviews

    4 Crore+

    Salaries

    1 Cr+

    Users/Month

    Contribute to help millions
    Get AmbitionBox app

    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