0% found this document useful (0 votes)
30 views12 pages

Java Interview Questions Canada

The document contains a comprehensive list of interview questions for Java Developer positions across various companies, including Accenture, Infosys, TCS, and others. Questions cover topics such as Java features, Spring framework, microservices architecture, exception handling, and data structures. It also includes coding challenges and design pattern inquiries, reflecting the technical depth expected from candidates.

Uploaded by

Revanth p v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views12 pages

Java Interview Questions Canada

The document contains a comprehensive list of interview questions for Java Developer positions across various companies, including Accenture, Infosys, TCS, and others. Questions cover topics such as Java features, Spring framework, microservices architecture, exception handling, and data structures. It also includes coding challenges and design pattern inquiries, reflecting the technical depth expected from candidates.

Uploaded by

Revanth p v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

05-12-2024: Accenture: Java Developer

1. Explain your project? What module you developed? Explain the


architecture?
2. Features in jave 11, 17
3. what is var?
4. explain functional interface?
5. how to create F1?
6. is @ mandatory for FI?
7. if two abstract method are there in FI, will I check runtime or compile time
or checked exception?
8. what is predicate?
9. Using predicate find a number is even or not
10.Employee class has id, name and sal; sort by name using stream
11.Employee class get salary and add to another list
12.difference between map and flatmap
13.Explain microservices architecture?
14.What is fault tolerance?
15.write code for circuit breaker?
16.Global excepting in SB

20-12-2024: Infosys: Java Developer

1. Explain the current project


2. What is volatile keyword? Explain a real time scenario?
3. What is singleton design pattern?
4. How to secure spring boot application?
5. Other than spring security, have you used anything else?
6. What is concurrenthashmap?
7. How to do authorization in java ?
8. When using 3party apis, how to secure the application?
9. How did you handle memory leak in java app?
10.Difference between @Component, @services, @Controller, @Repo
11.Design a banking system, explain each modules and tech stack used for
each modules, backend and which db used
12.Difference between sql and nosql?
13.Given an integer array nums, return all the triplets [nums[i], nums[j],
nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] +
nums[k] == 0.
14.In DB we have a column with array as datatype, how to fetch this column?
15.How to find the second highest salary in db?
16.Suppose you have production issue and have to solve the issue as soon
as possible; how will you debug?
17.After debugging how will you solve it? What about the to the scalability of
the application?
18.Have you used java 8 streams? When?
19.Why did you use it when compared to traditional ways?

26-12-2024 Iris Software

1. Linkedleist vs arraylist
2. Java generics
3. What is immutable objects? How to create one?
4. Comparator vs comparable?
5. Map vs flatmap
6. Dependency injection
7. Various scope is IoC
8. How spring MVC works?
9. Post vs Put
10.What is Patch?
11.How autoconfiguration works in sb?
12.What is service discovery and registry?
13.Implement many to many in DB.
14.Explain CICD
15.Different stages in CD
16.How to create Docker files? Explain the steps

08-01-2025: TCS: Java Developer for RBC first round

1. What are the recent project and tech stack?


2. Global Exception Handling
3. New changes in java 8
4. Difference between stream vs collections
5. Why and when to use stream api?
6. How did you do Jenkins pipeline? Explain ci/cd pipeline
7. How did you connect with different environment?
8. Kafka? High level architecture in kafka, producer
9. Have you used spring security?
10.Explain Spring Jpa and Hibernate? Different mapping?
11.What is composite key?
12.How did you connect with different microservices? Communication? Was it
rest or webclient?
13.Transaction management in spring boot

January 10th 2025- CTS for TD- first round

1. Explain the internal implementation of Hashmap


2. How to store a custom object to Hashmap? What the strategies?
3. What is the importance of using hashcode and equals methods?
4. Importance of implementing equals method?
5. What happens if we override just hashcode not the equals method?
6. Explain OOPs concept by citing few examples.
7. What is the working module for OAuth2 token?
8. Explain the mechanism of HTTP to HTTPs?
9. Branching strategy followed when migrating from dev to production.

January 14th 2025 – IBM


1. What methodology are you using?
2. Explain your agile methods? Stand up etc?
3. Do you have epic? Features?
4. What is heap and stack?
5. How did you resolve any production bug assigned? What strategies and
steps have you taken?
6. Coding question: custom sorry an array- even nos to left and odd to right.
January 15th 2025 – TCS
1. What CompletableFuture in Spring boot?
2. How did you process some data in asynch communication?
3. What is Kafka?
4. What is partition in Kafka?
5. What is rebalancing?
6. Explain CICD? What is Jenkins?
7. Have you used ELK stack?
8. If you have an application with high TPS, how to handle it increase the
performance?
9. What is finally()?
10.How to do handle exceptions? Do you handle it through the application or
in the outer layer?
11.What security have you used?
12.If you a bean ana a service layer bean when will be loaded? Is lazy or early
loading? How to create bean later only when needed?
13.Have you used SSL certificates?

January 23rd 2025 – RBC- 1st round - TCS

1. Abstract class vs interface


2. Oauth from resume
3. CI/CD
4. How did you use maven?
5. How did you optimise the deployment by 20% according to resume?
6. Test fail and test pass? What else do you use?

January 23rd 2025 EPAM (1st round)


1. Abstract vs interface
2. Equals() vs ==
3. List vs hashset
4. Arraylist vs Linkedlist for get and delete
5. profiles in Spring boot
6. default method in java
7. functional interface
8. design principles SOLID, KISS TRY
9. try catch finally
10.Explaing Testing pyramids?
11.mockito
12.What is Mocking?
13.tdd and Bdd
14.ci cd,
15.maven , jenkins
16.Database problem having clause
17.stream api question using groupby
18.design pattern visitor pattern based
19.What is multithreading- complete future

January 27th 2025, RBC – 2nd round


1. Explains OOPs in Java
2. What is method overriding and overloading? Why do we need it?
3. Encapsulation vs Abstraction
4. Abstract Class vs Interface
5. What are the different levels of inheritance?
6. Multiple inheritance in class / interface?
7. What are default and static methods in interface? How are they both
different to each other? What is the use of these?
8. What is multithreading?
9. How to create a tread?
10.Lifecycles of multithreading?
11.States of multithreading?
12.What is Functional Interface?
13.Give Predefined FI in Java
14.Can a FI extend another FI?
15.Explain Predicate, Consumer, Function and Supplier
16.What is Streams API?
17.What are the different operations in Streams?
18.Is iteration available in intermediate operation?
19.Map vs Flatmap?
20.What is Optional class?
21.What is springboot?
22.How to start a springboot app?
23.Explain @SpringBootApplication
24.@RestController vs @Controller
25.Various scopes in spring?
26.What is microservices?
27.Explain SOLID
28.What is Pub/Sub?
29.Different types of APIs
30.Different REST API methods
31.PUT vs POST vs Patch
32.Try catch finally
33.Final, finally() and finalize()
34.Try with resources
35.How did you do Logging?
36.How to set the log levels?
37.Design a Restaurant Application. Write different classes and their
functions.

Capgemini interview questions


HashMap internal working/ Class as a key
Synchronized HashMap vs Concurrent HashMap
HashSet vs HashMap
HashMap vs Concurrent Hashmap
Array vs ArrayList vs LinkedList
HashMap vs HashSet vs HashTable
How does JVM load classes
Exception
Other: deep copy vs shallow copy
why do we need Wrapper classes,
why is string immutable,
what happens when you modify a collection while iterating(multi-
threading)

What is a Thread --- and its life cycle


What is Thread-Safety
What is a DeadLock
How to take a thread dump
Exception Hierarchy

Changes introduced in Java 8

What is a functional interface -- vs interface -- how do you create/ is annotation


mandatory
Name a few functional interfaces
Ask about Predicate, Supplier, Consumer
Comparator vs Comparable
Explain about generics & advantages

Difference between Collection and Stream


Intermediate and terminal operations in streams
Filter , map Vs Flatmap
Stream is Eager or lazy? why?
findFirst() and findAny()

Other: Abstract class vs interface,


What is Optional Class, when should i use it
Date API - thread-safe, LocalDate, LocalTime etc

Design patterns you worked on/ aware of

Immutable class - how do you make a class immutable


what happens if you have a collection in your immutable class
why is string class immutable/ any knowledge about string-pool

Singleton class - how do you make a class singleton -- is it thread-safe

--------Spring--------

What is Front Controller -- what is DispatcherServlet

Explain about Spring Profiles used

Explain Class level vs Method level @annotations

What is IoC -- DI and types (Constructor and Setter)

Bean Factory vs Application Context

Bean Scopes ? How can we define bean scopes

What are the Spring Boot properties and how to define them? --server-port
number, database connection configuration etc

@SpringBootApplication : declaring a class with @Configuration,


@EnableAutoConfiguration and @ComponentScan annotations.

@Controller vs @RestController
@Component , @Service

@RequestMapping
How to define mediatypes (types of Consume/Produce) @Produces

@RequestParam vs @PathVariable
Authenticate vs Authorize -- how do you control the end point access for different
roles
Difference between PUT and POST?
What is Unit testing
Annotations
@Mock Vs @Spy
---------------------------------------------

TCS interview round 1


What is difference between == and .equals method
What is synchronization
Internal working of hashmap
Concurrent modification exception
What is @restController Annotation
Program of anagram group

TCS client round 2 (Morgan Stanley)


What is singleton class
Write any singleton class with synchronization and clone method
Design parking lot(classes and interfaces)

----------------------------------------------------------
Synechron Round 1
Difference between string stringbuffer and stringbuilder
What is composition real world example
What is optional class & methods of optional class
Terminal operators and intermediate operators
Valid return types of controller class
In ecommerce application how many tables will you create like customers,
orders, shipping, product
What is the return type of each operation in stream
Program to find first non repeated integer

Map<Integer, Long> intMap=Stream


.of(1,1,2,2,3,4).collect(Collectors.groupingBy(s->s,
LinkedHashMap::new, Collectors.counting()));

Optional<Entry<Integer, Long>>
output=intMap.entrySet().stream().filter(s->s.getValue()==1).findFirst();

System.out.println(output.get());

--------------------------------------------------------------

Synechron Round 2

Which collection have you used? What is difference between arrayList and
LinkedList?
What is hashMap? Internal working of hashMap.
How to implement Dashcode method? And what does hashcode() method do in
string class.
Why string is immutable? And What is SCP?
How to create thread? What is working of .start() method? What is working of
main thread?
What is the working daemon threads?
Difference between hashTable and Concurrent HashMap?
Java 8 new features?
What is optional class?
SQL Query
How to update male as female and female as male?
Java Program
To reverse Array without using temp variable and temp array
Count words in String "AREA"
Why java is platform independent?
What is JIT?

Capgemini interview questions: 04.11.2025

How do microservices communicate with each other?


Explain thread
Why String is immutable
Monolithic to microservices architecture
Circuit breaker
Monitoring tools used in microservices
what is server config
@SpringBootApplication annotation
Authentication and authorization
What is lock?
Comparator vs comparable
hashmap and hashtable how are they related
Explain stream
Unit testing

eBay interview questions: 04.22.2025

Tell me about yourself.


How do you manage conflicts?
Can you explain your project where you have used microservices?
What kind of architecture have you used?
Which design patterns have you used?
Have you implemented linked list? How so?
What role have you played as a DevOps engineer?
May 5, 2025: AMA Global Screening Round (Java Developer - Intuit – 15
minutes)

1. Tell me about yourself.


2. What are Scopes?
3. What is an Actuator?
4. Are you familiar with Java 8 Features?
5. What is a Functional Interface? Give me an example of a Functional
Interface. (Where have you used it?)
6. What is Java Multi-Threading?
7. What is a Deadlock?

May 8, 2025: AMA Global Technical Screening Round (Java Developer -


Intuit – 1 hour)

1. Tell me about yourself.


2. Difference between POST Request and PUT Request?
3. How are a PUT Request and a PATCH Request different?
4. Difference between Stream and Collection?
5. How does Stream work?
6. Is Stream mutable or immutable?
7. Difference between @Controller and @RestController?
8. Coding Question:
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"],
["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
Latest interview questions:
Explain your project, role, responsibility.
How to do exception handling.
How GC works in java.
Should we use or avoid finalize method for GC.
What cause memory leaks in any applications.
How to detect and solve memory leaks problem.
Latest GC algorithm and improvement over the past one.
Multi-threading in java. How many ways can we implement threads in java?
Future v/s completable Future.
What is semaphore.
Race condition in java.
How to do asynchronous programming in java.
What design pattern is used for ‘for loop’ in java.
How to implement singleton design pattern in java (explain the code which you
have written)
What is the advantage of interface over abstract classes other than inheritance.
Exception handling in java (example for each type).
If try and finally both throw the exception what will be the output. (Which
exception will be printed and why)
Difference between LinkedHashMap and TreeMap.
SynchronizedHashMap v/s concurrentHashMap (why we need concurrency).
Explain how hashmap works (when we add elements, in case of collision, whe we
search for elements)
In what condition we prefer Linked-List over ArrayList. (memory impact of both)
Why do we need to use a static variable in java. (not what static variable is but a
usecase).
Java 11 features (Records and sealed classes)
Java Stream usages and writing a code to filter and map the elements of a list
and return the resultant list.
How java streams work.
Functional interface in java? Why we need them?
How many test-cases will you write for a typical java method.
Spring Questions:
Spring containers (type and usages)
Dependency Injection (type and usages)
Which type you will prefer and why (DI context)
What is circular dependency in Spring
Bean life-cycle
Spring IOC
Spring Actuator (can we write custom endpoints ?)
Spring AOP
How to do synchronous and asynchronous communication between Spring APIs.
How to handle the requests to a rest service if the service is down.
How to implement circuit breaker for a Spring Application.
Steps to implement Spring Security in a Spring Boot application.
What all part JWT token has.
How JWT authentication works (what all methods will you write to implement JWT
authentication).
How to implement a scheduler in Spring.
Scheduler in multithreaded environment (without Kafka).
Why do we need kafka.
Elements or important parts of Kafka.
SAGA design pattern.
CAP theorem.
SOLID design principle.
Dev-Ops questions
What all stages will you define in Jenkins pipeline.
How to deploy an application using Docker.
How to resolve conflicts using Git.
Why do we use load-balancer.
Why do we prefer cloud over conventional deployment.
Coding Questions :
Develop a stock trading system to handle day trading scenario.
Write a static web-page in Angular.
Group anagrams from a list of Strings.
Hexaware interview questions

.L1 round:
1. Diff between filter and map.
2. Java 8 features
3. write code to check Integer value is a palindrome or not
4. object class method
5. Name of the in-built final classes
6. gave some code regarding the exception and needs to tell them what the output.
7. How microservices talk to each other
8. Write an immutable class
9. Diff between PathParam bs RequestParams, & write and implement the Syntax for
PathParam
10. How to create a thread, write it
11. Write a code to implement a Functional Interface
12. How many types of JOIN
13. What is the difference between an IAM user and a root user
14. What is the difference between throw and throws.
15. What is the difference between checked and unchecked exceptions?
16. What is the difference between compile-time polymorphism vs Runtime
polymorphism
17. What is the difference between an abstract class and vs Interface
L2 Round:
1. Kafka components
2. How Kafka is better than other Messaging queues
3. Explain it current project
4. Difference between flatMap and Map
5. How Thread is different from Executor Service
6. Implement code for the Singleton class
7. How do you figure out if one of the consumers goes down?
8. diff between == and equals method
9. gave code regarding exception and said what's the output
10. Why do we need to override equals method and hashCode
11. what is @componentScan annotation do
12. What is diff between @Component and @Service annotations
13. implement code and sorted the list of Employee based on highest to lowest Salary
14. How to implement caching in Spring Boot project

You might also like