🐥
The Tech Toolbox
Visit My Website!LinkedIn Profile
  • ✍️Introduction
  • ✍️Laptop Setup Guide
  • ✍️Quotes
  • Interview Preparation
    • 🔥Topics To Cover
    • 🔥System Design
    • 🔥Google Interview
      • Data Structures
      • Algorithms
      • System Design
      • Programming Concepts
      • Behavioral
    • 🔥Documents
  • Question Answers
    • ⭐Question Set 1
    • ⭐Question Set 2
    • ⭐Question Set 3
    • ⭐Microservice Architecture
    • ⭐Company-wise
      • Publicis Sapient
        • Core Java Section
        • Solutions & Tools
        • Microservices
        • Mix Questions
      • Mastercard
      • Finicity
  • Notes
    • 🎯Java Fundamentals
      • Time & Space Complexity
      • Design Patterns
      • Collections
      • Java 8 Features
      • JVM Internals
      • Generics
      • Multithreading
    • 🎯Spring Fundamentals
      • Spring Boot
      • Spring AOP
      • Spring Cloud
      • Spring Security
      • Spring Batch
    • 🎯Database
      • Oracle SQL
        • Aggregate Functions
      • MongoDB
        • Commands
        • Aggregate Query
      • Distributed Transaction
    • 🎯Apache Kafka
      • Kafka with Spring Boot
      • Partitions
    • 🎯Redis
    • 🎯Mockito
    • 🎯Docker
      • Commands
    • 🎯Kubernetes
      • Commands
    • 🎯Prometheus
    • 🎯Build Tools
      • Gradle
      • Apache Maven
    • 🎯Architecture
      • API and Integration Strategy
  • ⚓Developer Reference
    • ❄️GCP
    • ❄️Linux
  • Structured Learning Plan
    • 🍉Java Multithreading
    • 🍉Data Structures
    • 🍉Spring AOP
    • 🍉Transaction Management
    • 🍉MongoDB
    • 🍉Design Patterns
    • 🍉System Design
Powered by GitBook
On this page
  • Java Language Fundamentals
  • Threads and Concurrency
  • Collections
  • Design Patterns
  • Exceptions and Errors
  • Coding
  • Spring Boot
  • Microservices
  • Testing
  • Miscellaneous

Was this helpful?

  1. Question Answers
  2. Company-wise

Mastercard

PreviousMix QuestionsNextFinicity

Last updated 2 years ago

Was this helpful?

Java Language Fundamentals

  • Can we extend string class?

  • Why string class is immutable?

  • is the difference between String = "s" and new String("s")

  • Are strings eligible for garbage collection

  • Explain the deep of equals/hashcode method.

  • What are immutable objects

  • Java ? Demonstrate using an example.

  • What is generics in Java

  • Class vs object

  • create a class as static

  • when return is used inside a try block

  • when System.exit() is used inside a try block

  • What is the difference between path and classpath

  • a constructor be made final?

  • What is the method?

  • Explain the in Java 8.

  • Explain interfaces in the collection framework.

Threads and Concurrency

  • How can we create a thread in Java?

  • In which case do we not need to pass any mutex object?

Collections

  • HashMap internals

  • Concurrent HashMap vs HashMap

  • Benefits of Optional class

  • Java 8/9 features - Questions around Optional class, Stream API

  • What are the methods provided by HashMap

  • If equals returns true and hashcode method returns false in HashMap, will it add the object

  • Explain Queue data structure.

  • What problems are related to tree data structures?

Design Patterns

  • Java design patterns - Explain at least 1 or 2 patterns from each category

  • Demonstrate the builder pattern

  • Demonstrate the observer pattern / strategy pattern

  • Factory Design Pattern

  • Builder Design Pattern

  • Which design patterns have you used in your project

Exceptions and Errors

  • Can we catch the error?

Coding

  • Find odd numbers from list of integers using Stream API

  • Write a method to identify vowels in a string and number of times vowels are repeated in the same string

  • Describe your role in your current project

  • How to review code of your team members and which rules you keep in mind

  • Explain how to find the kth smallest element in an organization, where k represents the third youngest student.

Spring Boot

  • How to establish connection to DB in Spring Boot?

  • Can we do autowiring by interface?

  • In case of autowiring by interface, what if there are two different implementations? Which bean will be autowired?

  • How to change the default web server in Spring Boot

  • How to retry in Spring Boot

  • How to do a health check

  • What is the difference between @Component, @Service, and @Autowire annotations

  • What is JPA

  • Have you used Hibernate JPA in your Spring Boot application and how

  • What is the difference between SpringRunner and Mockito

  • What is the difference between soap and REST API

  • What is the difference between JSON and XML

  • What is @RequestMapping annotation

  • What is Spring Actuator

  • What are the REST API URL patterns

  • Create a REST controller class and add all HTTP methods

  • Explain @Primary annotation.

  • When to use @SpringBootApplication and @EnableAutoConfiguration annotations?

Microservices

  • Can we establish parallel connections to separate DB in Java?

  • Exception handling in microservices

  • Circuit breaker pattern

  • Data consistency in microservices in case of failure

  • How to scale a pod in case of load (e.g. 70%)

  • Benefits of microservices architecture? How is it different from monolithic application?

  • How to do health check of microservices

  • How to retry if a service is down

  • How do circuit breakers work

Testing

  • Different types of testing used in a project

  • How to mock objects in unit tests?

  • Questions around the Mockito library

  • What is a contract test / functional test / integration test, etc.

  • Explain the CI/CD process

Miscellaneous

  • What is Sonar and what is its use

  • Give a rating score of your skills

to return a value from a thread?

is the Callable interface?

Explain

Explain .

How are used in multithreading?

How is implemented in Java?

the lock is implemented when we use a synchronized method?

custom objects as key in HashMap

Explain .

custom exceptions? Can we have custom errors?

Return true if a list of numbers contains odd numbers, false otherwise

is @RequestBody and @ResponseBody annotation

resolve circular dependency problem?

⭐
What
explanation
Call by value or call by reference
How to
What happens
What happens
Can
finalize
Stream API
How
What
Daemon threads.
race condition
locks
synchronization
On which object
How to handle
Tree data structure
Can have
using Java 8
What
How to
Page cover image