You are on page 1of 14

• Explain your code if you want to develop simple REST service (GET/POST)?.

• I have started from main class with @SpringBootApplication annotation to Repository


class with @Repository annotation.
• Added Swager + Spring Security class code +Oath2 Security config.
• How to be merging Object from Entity class to Response class.
• I have explained A to Z of a GET response REST service.
• Hierarchy of Spring Data JPA repository
• java 8 features with Concurrency and parallelism & how unit test this code.
• microservices design patterns.
Java

• Actuator.
• Circuit Breaker (hystrix circuit breaker)
• How to check log of fat jar.
• How do you configure property files of a microservice in my project?
• How to achieve 80% code coverage and how this is configured in your project.
• Basic knowledge of java script-based server-side development (NodeJS)
• Apache Camel
• Explain inter microservice communication?
• Basic of Horizontal and vertical scaling (Docker/Docker swarn/ kubernetes + AWS
cloud)

• Spring and Spring Boot Framework


• Dependency Injection and Auto wiring in Spring
• How microservices interact each other (Rest Template etc)
• Differences between Controller/Service/Repository stereotype annotations in Spring
• JPA and Hibernet
• Maven
Java

• Scopes of Spring Bean


• How singleton classes can be created
• Immutable classes
• Collections Framework
• Threads
• Exceptions
• Spring security

• Singleton class working


• Database query for performance management. How to reduce execution time
• Interceptors and filters
• Binary tree and Algorithms scenarios
Java

• Data structures scenarios


• Some real time scenarios related to authentication and Spring security
• Given an array of numbers, write code to reverse some set of numbers within that
array. (example reverse numbers from index 2 to 5)

1|Page
• What is dependency Injection? How do we implement it with Spring Boot?
• @Autowired annotation - what is auto wired - where does the value come from?
• Mention some of the annotations we use in Spring Boot and explain.
Java

• @SpringBootApplication annotation is the combination of which all annotations -


explain.
• What are Micro services?
• Candidates should be super clear with their Spring & Spring Boot basics to
intermediate. They did not ask any Core Java questions to me.
• 1) About HashMap
• 2) Java 8 Features
• 3) Spring Security
Java

• 4) Rest ApI error codes and trouble shooting


• 5) Inheritance and Scenario based question on it
• 6) Spring Boot Annotations
• 7) Spring Repository and how do we map the entity beans

• Java 8 - Streams Basics


• HashMap & its internal implementation, concept of hashing
• Difference between Abstract class and Interface in Java 8 perspective - how we
resolve diamond problem / ambiguity since Interface default methods are allowed
now, why interface default methods - backward compatibility.
• Polymorphism - Overloading & Overriding
• Static keyword in Java
• Constructors, inheritance.
Java

• Garbage collection
• Immutability of Strings in Java
• .equals() method and "==" operator in Java
• POM file -dependency management
• CI/ CD related - tools used for Continuous Integration & Continuous Delivery/
Deployment in my team
• git commands
• Agile basics

2|Page
Spring Boot/ Webservice
• How you will ensure the security access to your webservice.
• How you will layer your webservice so that through internet there will not be any
unauthorized access to your webservice.
• How to control call limit to say 200 calls from particular client to our Spring boot
webservice
• Any idea on Rate Limiter

Core Java

• How to detect cycles in LinkedList say (A->B-C->D->B)

RDBMS
• Suppose there are millions of record rows. how you will handle the fetching of
records from your project
Java

• How can we index a non PK/ non key column in table. What is cluster and non -cluster
indexing
• The Employee table holds all employees including their managers. Every employee
has an Id, and there is also a column for the manager Id.

+----+-------+--------+-----------+
| Id | Name | Salary | ManagerId |
+----+-------+--------+-----------+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
| 4 | Max | 90000 | NULL |
+----+-------+--------+-----------+
Given the Employee table, write a SQL query that finds out employees who earn more than
their managers. For the above table, Joe is the only employee who earns more than his
manager.

3|Page
• What is the difference between Spring and Spring boot? We can write APIs in spring
also then why spring boot.
• What is the difference between Micro service and rest service?
• What are the ACID properties? How we will follow in code.
• How beans will be initialized in spring boot. Scenario: We are having Class A and
Class B,
• So class A needs class B reference and class B needs class A reference how we will
achieve.
• Write code for producer and consumer problems using threads.
• What is the difference between abstract class and interface? How we will overcome
Java

the diamond
• problem with default implemented functions from interface.
• What is the difference between process and thread? Thread how it will run.
• What is the difference between goroutines and Threads in java? Why are routines
more popular compared to java threads?
• Write code below requirement.
Given an array A[] and a number x, check for pair in A[] with sum as x
arr[] = {0, -1, 2, -3, 1}
sum = -2
-3 1
• What is use of make function in GoLang
• What is Kafka…Use of API
• Spring Boot annotations, difference btw spring/spring boot
• Interface vs Abstract class, Concept for producer/consumer problem using java using
blocking queue and write code.
Java

• RDBMS ACID properties, broken concepts around microservice.


• Problem scenario “Check for pair sum”, explain the algorithm and write code using
go.
• difference between Goroutines/Threads/Process

4|Page
• how to create a singleton class and if u configure that as singleton will spring use it-
ans-need to use static factory method.
• how to configure a static factory method.
• RDBMS vs NOsql db when to use which db.
• disadvantages of microservice architecture from developer side.
• tell all the design paterns u used in microserivces.
• in mongodb when data is spread across multiple nodes ,how does the searching
happens
• In web application ,if a certain user is accessing website for many number of times,
how to low prioritise him and give changes to other users?
• In web application will thread be created for each request?
• scopes in spring bean. when to use which scope.
• same database query to finds out employees who earn more than their managers.
• which search algorithm to use if it is just a tree(it is not a Binary tree.)

• Write an efficient algorithm that searches for a value in an m x n matrix. This matrix
has the following properties:

Integers in each row are sorted from left to right.

The first integer of each row is greater than the last integer of the previous row.
Java

Input: matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3

Output: true

• The Employee table holds all employees including their managers. Every employee
has an Id, and there is also a column for the manager Id.

+----+-------+--------+-----------+
| Id | Name | Salary | ManagerId |
+----+-------+--------+-----------+
| 1 | Joe | 70000 | 3 |
| 2 | Henry | 80000 | 4 |
| 3 | Sam | 60000 | NULL |
| 4 | Max | 90000 | NULL |
+----+-------+--------+-----------+
Given the Employee table, write a SQL query that finds out employees who earn more than
their managers. For the above table, Joe is the only employee who earns more than his
manager.

5|Page
+----------+
| Employee |
+----------+
| Joe |
+----------+

• write a function to reverse the sub array [7,8,9,1,2,4,6,4,32] reverse the array
elements from index 2 to index 5
• program to check if the elements are closed properly or not
String s="{}[]()"//valid string and String s1="{[]}"//also valid
String s="{[(])}"//should be invalid.as the the open braces is not properly closed.
• In projects…….
• asked about stack data structure and methods in stack
• About different advices in spring AOP ,before advice vs Around Advice ,
will control goes to target even if exception raised in Before advice?
• how to handle exceptions in completablefuture.
• Multithreading

6|Page
• Difference between Microservices and monolithic design. Advantages &
disadvantages.
• how to handle session in Microservices
• how to handle authentication in between the microservices
• Data structure
• Mongo DB query fetching and how to make faster queries.
• Data fetching in MongoDB
• sql query regarding the employee and manger salary.
• Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's
(water), return the number of islands.

An island is surrounded by water and is formed by connecting adjacent lands horizontally or


vertically. You may assume all four edges of the grid are all surrounded by water.

Example 1:

Input: grid = [
["1","1","1","1","0"],
["1","1","0","1","0"],
["1","1","0","0","0"],
Java

["0","0","0","0","0"]
]
Output: 1

Example 2:

Input: grid = [
["1","1","0","0","0"],
["1","1","0","0","0"],
["0","0","1","0","0"],
["0","0","0","1","1"]
]
Output: 3

• Microservice architecture
• Communication between microservice
• Hystrix
• Difference between image and container
• Steps for moving code to azure cloud
• How db was setup in cloud

7|Page
• 1) encryption mechanism vs hashing mechanism
• how hashcode works internally?
• Database query optimization?
• How to control the call limit to say 500 calls from clients.
• How to find out a particular element in a tree, which sorting mechanism is the
Java

best?
• when we call the Arrays. Sort() method internally it follows which sorting
mechanism?
• someone called your service which is running on other process. How can you
provide authentication and authorization?

• How hashmap() works internally?


• How Linkedlist works internally?
• Spring Dependency injection and ioc principle
• Spring auto wiring
Java

• spring boot project structure


• about previous project and roles and responsibilities
• Scopes of Spring Bean
• Given an array of numbers, write code to reverse some set of numbers within
that array. (example reverse numbers from index 2 to 5)

8|Page
• What is the difference between VM and container?
• Arrays.sort() internally which sorting algorithm to use?
• What is space complexity for quicksort?
• What is the time complexity for Binary Search?
• How to restrict a particular client accessing an application?
• What are the properties we can access from the external class to the inner class?
• How many ways to authenticate users to access applications.
• We have thousands of records in one table. Select query taking a long time to
fetch the data. How you can optimise.
• Write a query for the below requirement.

• +-------------+---------+
| Column Name | Type |
+-------------+---------+
| id | int |
| num | varchar |
+-------------+---------+
id is the primary key for this table.

Write an SQL query to find all numbers that appear at least three times
consecutively. Return the result table in any order. The query result format is in
the following example:
Java

Logs table:
+----+-----+
| Id | Num |
+----+-----+
|1|1|
|2|1|
|3|1|
|4|2|
|5|1|
|6|2|
|7|2|
+----+-----+

Result table:
+-----------------+
| ConsecutiveNums |
+-----------------+
|1|
+-----------------+
1 is the only number that appears consecutively for at least three times.

9|Page
• Java 8 and microservices questions related to data structures and algorithm
• Binary tree vs Binary search tree-Space Complexity & Time complexity
• Quick sort vs merge sort-Time complexity
• Zuul Api gateway? what is the need for api gateway?
• What is Eureka? why we need eureka?
• Write an SQL query to find all numbers that appear at least three times consecutively.
• Which Data structure does Binary tree use?
Java

• Which Data structure is used by Linked List?


• Lambda Expression in java 8?
• Streams vs Parallel Stream?
• Single Linked List vs Double Linked List? Also which Data structure they use?
Which is better ? Quick sort or Merge sort?
• Drawbacks in Microservices?
• How to restrict an user accessing your web application?
• Forkjoinpool vs executorService?

• About my recent project which I worked and how difficult I felt leveraging monolithic
architecture to microservices?
• Monolithic vs Microservices?
• Disadvantages of microservices?
Java

• How to ensure secured communication between microservices?


• How JWT works?
• Advantages of Eureka?
• Dockers Image vs Docker Container?
• Find an element in array such that sum of left array is equal to sum of right array?

• Binary Search in Java


arr = {2,3,5,50,60,100,110}
Java

input = 100
Find the input from the arr using binary search
• Write the code for creating a new Rest Endpoint in a Controller. Requires code
• Find repeated words in the given sentence and count the repetitions - "today is is is a
sunny sunny day today today is a sunny"
Output should be like -
today - 3
is - 4
Java

a-2
day - 1

• Give any 5 annotations and its usage in Spring Boot.


• How you will debug and identify the issue if any issue was reported by customer in
production

10 | P a g e
• define the project you have worked
• how would you make sure about the code quality - mentioned about design
principles?
• features of java 8
• difference between mongo db and normal oracle db
Java

• define how mongo db is implemented in spring boot application


• how one to many mappings in mongodb
• behavioral questions
o best achievement in the project
o how would you make sure the user story or feature is released on time?

• How we can secure our application from security perspective.


• What end points can be created for application.
• Which technologies used so far for encryption.
• How to validate data coming from rest end points?
• Quartz and spring batch
Java

• Connect and fetch data from mysql using sprint boot.


• How performance can be increased in mysql with large data.
• Asked many questions on my previous project related to technologies used and how
actually it happens in system.
• Inquired if I know about Kafka.

• String[] arr={ "Rf","Rama", "Ramqwerqwerqwer", "Ramqwerqwerqweraa"};


find the common content, answer should be Ram.
• How do you troubleshoot the spring 400 error -answer, you should first check the
Java

logs?
• An Stored procedure is running fine in dev and taking too long in prod, how do you
troubleshoot

• explain current project architecture and where you have involved?


• what are the services you have written and explain the business logic?
• which database you have used and explain it and tell me few tables’ names
Java

• Difference between Spring and Spring boot


• explain previous project flow and architecture and where you have involved.
• encryption vs decryption
• how can you store sensitive information in back end?

• Brief description about my profile


• Previous project description and question were asked related to the project and my
role in it.
Java

• How the workflow of the project is implemented, how did the application is scaled.
No of users used the application.
• Technology used in my previous project.

11 | P a g e
• Difference between Symmetric and Asymmetric key encryption
• what are the authentication methods in spring LDAP?
• How do you manage users in LDAP?
• Authentication vs authorization explain scenarios
Java Spring Boot

• In which scenarios to prefer Asynchronous programming over synchronous


programming.
• Difference between spring, Boot,
• annotations used in spring Boot.
• What is Dependency Injection,5 types of injections?
• Questions on previous project.
• about GIT
• Branching system in GIT, master vs release branches, child branches, how to resolve
conflicts
• how do raise, merge a PR
• what are the things to be considered while approving a PR

• What was my role in the last Project?


• How to develop Spring Boot Application
• What are the annotations used in Spring Boot Application?
• Steps to develop Spring Boot Application from scratch
• Any challenges faced in my last Project
Java Spring boot

• How do you implement exceptions the Application?


• Tools used for testing REST services.
• What IDE used, was stressing on whether I used IntelliJ IDE.
• How to deploy a normal web application other than Spring boot.
• How to deploy the application in Production
• How did you handle security aspects in an Application?
• Do you have experience in NodeJS and Docker?
• API tools used to test
• JUnit test cases
• How did you do performance testing
• How to configure a new Jenkins Job.

12 | P a g e
• Introduction and Project explanation/architecture.
• Spring Boot common annotations used.
• What are methods of Rest.
• What are mime types of @Produces?
• What is a resource in a REST?
• Types of Joins in SQL. What is Left Join?
• What is symmetric encryption and asymmetric encryption? What encryption did you
use in your project?
• Have you used Spring Initializer, how to generate Spring boot project using it.
What is an Actuator? Define a custom actuator using annotations?
• Difference between @RequestMapping and @GetMapping.
• What is the use of @Controller?
Java Spring boot

• What do you understand about Installment?


• What do you understand by pre purchase, during purchase and Post purchase?
• What do you understand by the code below and whether there is anything wrong in
it?
consumerTrxn.setCardBrand(consumerTrxn.getConsumerInfo().getPanType.getKey());
• What is an Issuer and acquirer?
• What is Synchronous and Asynchronous call? When to go for it?
• What is a POJO?
• What is serialization? When to use it?
• How do you test your application? When do you write test cases?
• Challenges if multiple people are working on the same class while developing?
• How does your code get deployed into production? Explain from the start of assigning
a task?
• Difference between Edge case and a corner case?
• What are you pro at?
• Challenges and achievements in your project?
• What are things to include in a report once an order is successful?
• What comes to your mind when "Paytm" is said?
• What is a four-party model?

13 | P a g e
• Complete architecture of current project.
• What is the methodology used in your project?
• Entire process from getting requirements to moving production.
• How is version management happening?
• What is the branching strategy?
• What is the first branch you have?
• What are the branches used in a release?
Java Spring boot

• Which branch will go to production?


• What are feacher branches?
• How Many microservices for your current application?
• How can we exclude any packages in the spring boot application?
• What are actuators?
• Tomcat port? How can we change that?
• how can we replace the default dependency and put the other dependency?
• Do you know the SOLID principles? Explain them all?
• Design patterns? Explain 3 or 4 patterns which you used in your previous projects.
• What are all the spring boot annotations you know?
• Difference between asynchronous and synchronous processes? when we prefer
these?
• What is symmetric and asymmetric encryption? which will be more secure?

14 | P a g e

You might also like