Mastercard
Last updated
Was this helpful?
Last updated
Was this helpful?
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.
How can we create a thread in Java?
In which case do we not need to pass any mutex object?
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?
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
Can we catch the error?
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.
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?
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
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
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?