EPAM Interview Questions and Answers

Earning a position at EPAM Systems, one of the top-tier global IT consulting and software engineering firms, requires extensive mastery of data structures, algorithms, problem-solving, systems design, and soft skills. EPAM is particularly famous for its intensive hiring processes, which include multiple coding challenges, technical interviews, and HR rounds that assess your skills at a deep-dive level and your teamwork abilities in a sprint.

The purpose of this blog is to gather the most recent EPAM interview questions based on real-world experiences and share them with the audience worldwide.

Table of Contents

Overview

EPAM Systems, which is one of the leading companies for software engineering, digital platform engineering, and product design, was founded in 1993 and is currently based in Newtown, Pennsylvania. With a global presence consisting of 55 countries, the company has a staff strength of about 62,000 and is expected to achieve an annual revenue of 5.4 billion in mid-2025. Recently, in May 2025, the company’s founder, Arkadiy Dobkin, is set to become the executive chairman of the board on the 1st of September and hand over the CEO position to Balazs Fejes.

Understanding the EPAM Interview Process

EPAM usually starts its hiring with an online coding assessment focusing on the candidate’s problem-solving capabilities, data structure management, and algorithms. The candidate’s Java and Object-Oriented Programming knowledge, design patterns, databases, systems, and even their previous projects are evaluated during one or two technical interviews as well. After a managerial or systems design interview, an HR interview, which focuses on the candidate’s overall communication skills, cultural alignment, professional goals, and expectations on the role, follows.

Step Stage Key Focus
1 Recruiter / HR Screening Background, role fit, process overview
2 Online Assessment Coding problems, DSA, English, logical reasoning
3 Technical Interviews Core programming, algorithms, OOP, and optional system design
4 Managerial / System-Level Round Architecture, leadership, Agile, project scenarios
5 HR & Behavioral Interview Cultural fit, aspirations, and team collaboration
6 Offer & Onboarding Offer discussion, joining logistics

 

EPAM Interview Questions for Freshers

Fresher candidates walk into the EPAM interview feeling they are right on the track where the knowledge they have gained will meet the skills they have practised. EPAM is well known for its straightforward, yet deep and fundamental questions, which check a candidate’s grasp on the basics of Java, algorithms, and problem-solving. As for answering questions, the structure is clearly given, topic by topic, and then conversational, very much in a way one would respond during an interview.

1. Describe your B.Tech project and your role.

During my B.Tech., I developed a cloud-based task tracker system. I designed the backend with Spring Boot, added a MongoDB database, implemented user sign-in, and designed the REST endpoints. System design, module coding, and application testing were my responsibilities, which improved my end-to-end engineering capabilities.

2. What is the difference between ArrayList and LinkedList?

An ArrayList element is kept in a dynamic array, which is a type of contiguous memory. This allows faster access through an index compared to accessing element data in the middle of the index. However, adding or removing element data in the middle of an index is slower.

In contrast, a node in a LinkedList holds an element in addition to having a reference to the next element node. Each element node contains data. This allows faster insertion of an element node and faster deletion of the node compared to element access, which is slower. This is because the whole list needs to be traversed to reach an element.

Aspect ArrayList LinkedList
Storage Uses a dynamic array Uses a doubly linked list
Memory Less memory, as it stores only data More memory due to storing links
Access Speed Faster (direct access via index) Slower (sequential traversal)
Insertion Slower in the middle (shifts data) Faster in the middle
Deletion Slower in the middle Faster in the middle
Search Better for random access Not ideal for random access
Use Case Best when read operations are frequent Best when add/remove operations are frequent

3. Explain BlockingQueue and its usage.

BlockingQueue is an example of a thread-safe queue. Its operations can block in the queue’s empty state (on take()) or full (on put()). This is ideal in a producer-consumer situation. It is a situation in which the queue is filled with tasks that can be taken as the consumers are ready and waiting to fetch them. No explicit thread-suspension techniques are needed. This is a simpler approach to achieve it and is more efficient.

4. What are SOLID principles?

SOLID is a set of five design principles. They are:

  • Single Responsibility: Every class should have just one reason to change.
  • Open/Closed: classes should be open for extension but closed for modification.
  • Liskov Substitution: derived classes should be substitutable for their base classes.
  • Interface Segregation: prefer many small, specific interfaces rather than a single large one.
  • Dependency Inversion: high-level modules should not depend on low-level modules; rather, both should depend on abstractions.

5. Describe a deadlock and how to avoid it.

A deadlock is defined as a state in which two or more processes (or threads) are waiting for each other to release resources and are therefore stuck in a state of suspension (for example, Thread A is holding Resource 1 and is waiting for Resource 2, while Thread B holds Resource 2 and is waiting for Resource 1). This is what is called a deadlock. Deadlocks can be avoided with a consistent lock acquisition order, tryLock() with a configurable timeout, or by reducing the synchronised range of the lock to lower contention.

6. What is the difference between Unit Test and Integration Test?

Unit tests validate individual units of code, such as methods or classes, confirming they work correctly step by step. Integration tests, on the other hand, evaluate the interfacing of multiple units, for example, the service layer’s operations with the database or other external APIs.

Aspect Unit Test Integration Test
Purpose Tests individual components separately Tests how components work together
Scope Small and focused Broader and covers multiple modules
Dependencies No external dependencies; uses mocks/stubs May involve databases, APIs, or services
Speed Faster (tests fewer lines of code) Slower (tests larger workflows)
Complexity Simple to write and execute More complex to set up and run
Example Testing a function that calculates tax Testing an API that calculates the total bill with tax and discount
Use Case To ensure code correctness early To ensure system reliability

7. What is the saga design pattern?

In microservices, the saga pattern is implemented for controlling distributed transactions. Rather than a global two-phase commit, every service manages a local transaction and issues events to invoke subsequent phases. If something goes wrong, compensatory transactions are performed to reverse the previous steps, ensuring data consistency across services without a monolithic lock.

8. What is serverless architecture?

Serverless architecture describes scenarios where application logic is executed within stateless containers of the cloud provider, such as AWS Lambda or Azure Functions. With this architecture, there is no need to provision or scale servers, as functions are simpler to deploy and scale with load. Further, scaling is charged on execution time, not idle time.

9. Define and compare stack, queue, array, and linked list, with examples.

Data Structure Definition Example in Java Usage
Stack Follows LIFO (Last In, First Out) Stack<Integer> stack = new Stack<>(); Undo operations, expression evaluation
Queue Follows FIFO (First In, First Out) Queue<Integer> q = new LinkedList<>(); Task scheduling, message queues
Array Fixed-size data structure storing elements in contiguous memory int[] arr = {1, 2, 3}; Fast random access
LinkedList Stores elements in nodes connected via pointers LinkedList<String> list = new LinkedList<>(); Dynamic memory allocation, frequent insertions/deletions

10. What is asymptotic (Big O) notation?

In computer science, algorithms are assessed based on time and space complexity in relation to the size of the input, which may be described in big O notation. It helps measure efficiency.

  • O(1) → Constant time (e.g., accessing an array element)
  • O(log n) → Logarithmic (e.g., binary search)
  • O(n) → Linear (e.g., traversing a list)
  • O(n²) → Quadratic (e.g., nested loops)

Example:

for(int i=0; i<n; i++) {
    System.out.println(i);
}

Here, the time complexity = O(n).

11. Explain various SQL JOINs (inner, left, right, full).

In SQL, a JOIN is used to relate two or more tables based on common fields, which combines rows from the tables:

  • INNER JOIN → Returns only the intersecting non-null records from the two tables.
  • LEFT JOIN → Returns all records from the left table or the primary table and all the matched records from the right or secondary table.
  • RIGHT JOIN → Returns all records from the right table and all the matched records from the left table.
  • FULL OUTER JOIN → Returns all records, and in cases where there is a match in one of the tables, the matched rows will be fetched.

Example:

SELECT e.name, d.dept_name 

FROM employees e 

LEFT JOIN departments d 

ON e.dept_id = d.id;

12. How is GROUP BY used in SQL?

Aggregate functions such as COUNT, SUM, AVG, MIN, and MAX are commonly used alongside the GROUP BY clause, which clusters rows according to one or more columns.

Example:

SELECT dept_id, COUNT(*) 

FROM employees 

GROUP BY dept_id;

This allows for determining the headcount of employees within each distinct department.

13. Differentiate between GET and POST HTTP methods.

Aspect GET POST
Purpose Used to retrieve data from the server Used to send data to the server
Data Visibility Sent via URL (visible) Sent in request body (hidden)
Security Less secure More secure
Use Case Search queries, fetching data Submitting forms, uploading files

14. How do you capture a screenshot in automation testing?

Capture screenshots in Selenium WebDriver using the TakesScreenshot interface:

File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

FileUtils.copyFile(screenshot, new File("screenshot.png"));

This aids in troubleshooting test failures.

15. Explain how to run TestNG test cases multiple times (invocationCount).

TestNG provides the option to set an invocationCount attribute for the test, enabling it to be executed multiple times.

@Test(invocationCount = 5)

public void testMethod() {

    System.out.println("Executed multiple times");

}

The test runs five times in this case.

16. How to execute specific tests only using TestNG groups?

Assigning groups to tests makes it possible to execute only selected groups.

@Test(groups = "regression")

public void testA() { }

@Test(groups = "smoke")

public void testB() { }

Then, configure testng.xml:

<groups>

     <run>

       <include name="smoke"/>

   </run>

</groups>   

17. How to run tests in parallel using TestNG?

By using the testng.xml file, enable parallel execution.

<suite name="Suite" parallel="tests" thread-count="2">

         <test name="Test1">

                 <classes>

                         <class name="com.example.TestClass1"/>

                 </classes>

         </test>

</suite>

This provides the capability for multiple tests to be executed at the same time, which optimises test execution time.

18. Explain your test data management strategy.

Effective management of test data ensures the right data is secure, accurate, and reusable, while test data management ensures its availability for testing. The following are essential practices:

  • Excel, JSON, and databases are used for test data storage
  • Production data is masked for sensitive information
  • Synthetic data is created when necessary

19. Describe your preferred test reporting framework.

Popular options include:

  • Extent Reports → Interactive HTML reports with screenshots.
  • Allure Reports → Offers detailed test execution reports with other useful visualisations.
  • TestNG Reports → Provides built-in reporting capabilities to capture pass/fail and other test execution statistics.

The decision is based on the needs of the project and its integration into CI/CD pipelines.

20. Explain the use of Maven or build tools in your testing setup.

Maven is responsible for handling project dependencies, automating the build, and executing the tests:

  • Incorporate necessary dependencies such as Selenium and TestNG.
  • Manage dependencies through the pom.xml file.
  • Execute tests through the command line.
 mvn clean test

21. What is the difference between Git and GitHub?

Although they are not the same, Git and GitHub are related:

  • Git is a version control system that allows you to keep track of local code changes.
  • GitHub is a platform that lets you collaborate with people and hosts your Git repositories online.
Aspect Git GitHub
Type Version control system Cloud-based repository hosting
Usage Tracks code changes locally Stores and collaborates on code online
Commands git add, git commit, git push Web interface for pull requests, issues, etc.

EPAM Interview Questions for Intermediate Professionals

For several years of experience, EPAM values and assesses the problem-solving capabilities, system design understanding, collaboration within a team, and quality of the executed code. In this section, we aim to streamline preparation by including commonly asked intermediate EPAM interview questions that cover design patterns, scalable architecture, performance optimisation, and project work in a pragmatic approach.

22. How do you push changes using Git?

git add .

git commit -m "Added new features"

git push origin main

Steps:

  1. Stage changesgit add .
  2. Commit changesgit commit -m “message”
  3. Push to remote repogit push origin branch_name

23. Implement a thread-safe Singleton.

To implement a thread-safe Singleton in Java, I’d use the ‘double-checked locking’ pattern with a volatile instance variable. Something like:

public class Singleton {
            private static volatile Singleton instance;
            private Singleton() { }
            public static Singleton getInstance() {
               if (instance == null) {
                   synchronized (Singleton.class) {
                        if (instance == null) instance = new
Singleton();
                    }
               }
return instance;
        }
}

While minimising synchronisation overhead, this ensures that only a single instance is created even during concurrent access.

24. Design a scalable URL-shortening service (e.g., bit.ly).

For my side of the project, I’d begin by associating long URLs with unique short codes, mapping them via base62 to enable the generation of compact tokens. Lookups would be best served by a distributed storage system like Cassandra or DynamoDB. For rapid global redirects, a CDN would be best, and for hot URLs, I’d use a write-through cache such as Redis. From the quoted text, to further scale, I’d hash-key partition, shard database writes, and stateless API serve behind load balancers. To prevent abuse, add rate limiting, a link-creation queue, and a click stat counter that runs asynchronously.

25. How do you handle team conflicts effectively?

I practise direct but caring communication. First, I listen to understand all sides. Then I guide a discussion to illuminate the roots and shared objectives. Lastly, I engage the team to generate acceptable solutions, setting my ego aside. I focus on the most favourable decision. Resolution verification is also important; thus, I follow up to confirm the conflict is truly resolved.

26. Explain O(log n) complexity with examples.

O(log n) concerns algorithms with problem sizes that reduce by 50% with each step. A classic example is binary search: each comparison halves the array. Balanced binary search trees, BSTs, and operations such as insert or search also have O(log n) time as they traverse the tree’s height, which scales logarithmically.

27. Describe your architectural approach in a Delivery Manager role.

I would begin as a Delivery Manager by gaining a deep understanding of project requirements, prioritising feature business value, and enforcing agile sprint planning discipline. After that, I would establish end-to-end visibility through project dashboards (Jira, Confluence), monitor for technical risks, and align with all stakeholders in advance through regular demos. I would streamline the deployment pipeline, monitor the QA feedback loop, maintain code quality, and deliver in clear, predictable increments.

28. How do you track daily/weekly/monthly performance metrics?

From the start, I’d set defined goals: cycle time, burn-down rates, defects, deployment frequency, etc. For the time being, I’d track daily progress by using stand-ups and dashboards. For my weekly check-ins, I’d conduct sprint retrospectives and demos. On a monthly basis, I’d assess broader KPIs like velocity trends, customer feedback, and quality metrics. Continuous improvement is ensured by visualising these metrics and discussing insights at each interval.

29. Share an impactful solution-architect-level challenge you solved.

In one of my projects, a requirement was to transform a monolithic app to microservices while ensuring both low latency and maintaining data integrity. I designed a service mesh architecture that allowed event-driven communication between loosely coupled services. I used Kubernetes for deployment and implemented a database per service with schema versioning. To improve resilience, I integrated circuit breakers, retries, and logging through a centralised ELK stack. This improved resilience resulted in an 80% reduction in downtime while scaling seamlessly.

30. How many coding questions were asked during your 1-hour technical round?

In my 1-hour technical round, I was given three coding challenges, two of them moderate and one of them difficult. Companies tend to ask in the range of 2 to 4 questions in a 60-minute window. For example, a string manipulation, a linked list traversal, and a question on dynamic programming, all designed to evaluate clarity, efficiency, and edge case handling.

31. What is an abstract class?

An abstract class is a class that cannot be constructed on its own. It may serve as a common base that provides shared code while leaving the implementation of some methods to derived classes.

32. What is an abstract method?

An abstract method is a method that is declared but not implemented in an abstract class. It only has the method name and parameters, but no body.
The subclasses (child classes) must provide their own implementation for this method.

33. Define an interface in Java.

An interface in Java is like a blueprint for classes. It contains only method names (signatures) and constants, but no method body. Any class that implements the interface must provide code for those methods.
From Java 8 onwards, interfaces can also have default and static methods with implementations.

34. What types of polymorphism exist?

Polymorphism comes in two types:

  • Compile-time polymorphism (static polymorphism)
    • This kind of polymorphism is fixed when the code is compiled. 
    • One typical example is method overloading, which occurs when a class contains several methods with the same name but distinct parameters. 
  • Runtime polymorphism (dynamic polymorphism)
    • This kind of polymorphism is fixed while the program runs. 
    • A crucial example is method overriding, which is the definition of a method in a subclass that shares the same name, parameters, and return type as a method in its superclass.

35. Define method overriding.

An object-oriented programming concept known as “method overriding” occurs when a subclass offers a unique implementation for a method that is already specified in its superclass. The subclass’s overriding method needs to match the parent class’s method in terms of name, parameter list (signature), and return type (or sub-type).

36. Overriding vs overloading – how are they different?

Having several methods in a class of the same name but with different parameters, which are determined during compilation, is called ‘Overloading’. ‘Overriding’ is redefining a method in a subclass, which is resolved during run time.

Aspect Method Overloading Method Overriding
Definition Same method name, different parameters Same method name and parameters, different implementation
Polymorphism Compile-time polymorphism Runtime polymorphism
Inheritance Not required Must involve inheritance
Return Type Can be different Must be the same or covariant
Access Modifier No restrictions Cannot reduce the parent’s access level
When Used To increase method flexibility To change or extend behavior

37. What is the finalize method used for?

The finalize() method is invoked just before the object gives way to the process of garbage collection. It is used for cleaning up resources and processes; however, it is now deprecated and replaced with AutoCloseable and try-with-resources due to its unpredictability and performance costs. 

38. Explain parts of public static void main(String args[]).

What each means is as follows:

  • public: one that is accessible by the Java Virtual Machine.
  • static: can be run without class instantiation.
  • void: which returns no value.
  • main: which is a method name recognised by the Java Virtual Machine.
  • String args[]: which is an array of all the command line arguments provided for the execution of the program.

EPAM Interview Questions for Experienced Professionals

Interviewers from EPAM expect a higher level of understanding for intermediate positions. In this stage, you are integrating a real-world mixture of technical skills along with hands-on implementation, showing that you are capable of turning knowledge into practical, sustainable, collaborative solutions. Expect a blend of system design, programming, design logic, behavioural science, personal introductions, and high-level negotiations that require elegance and refined communication.

39. Given a multithreading snippet, predict the output.

The outcome from a multithreading program can be random due to the thread scheduling from the Java Virtual Machine and the Operating System.

  • When multiple threads are active, the CPU will determine the order of thread execution.
  • You can use synchronized, join(), and lock methods to improve thread output predictability.

Example:

class MyThread extends Thread {

    public void run() {

        System.out.println(Thread.currentThread().getName());

    }

    public static void main(String[] args) {

        MyThread t1 = new MyThread();

        MyThread t2 = new MyThread();

        t1.start();

        t2.start();

    }

}

Possible Outputs:

Thread-0

Thread-1

Or

Thread-1

Thread-0

40. What is inheritance in Java?

Inheritance is when one class derives from another, inheriting its properties and methods. This is useful for code reuse, logical structure, and polymorphic behaviour.

41. Describe the stack data structure.

A stack is an example of a Last-In-First-Out (LIFO) structure, where items are pushed on top of the stack, and the one placed most recently is the one that gets pulled out. Consider a stack of plates. Only the one on the top of the stack is available to be accessed.

42. Stack vs queue – differences and use cases.

A stack is LIFO, where the most recently added element is the first one to be removed. A queue, on the other hand, is FIFO, where elements are added to the end and taken out from the front. Stacks are useful in doing recursion or keeping track of history, and the queue is useful in doing breadth-first search or in scheduling tasks.

Aspect Stack Queue
Definition Linear data structure that follows LIFO (Last In, First Out) Linear data structure that follows FIFO (First In, First Out)
Order of Access The last element added is removed first The first element added is removed first
Insertion Performed using push() Performed using enqueue()
Deletion Performed using pop() Performed using dequeue()
Access Point Only one end (top) is used for both insertion and deletion Two ends: front (deletion) and rear (insertion)
Examples Undo/Redo, Function calls, Browser history Task scheduling, Printer queue, Ticket booking

43. Describe stack implementation using arrays.

A stack can be designed with an array, assuming it follows the LIFO principle.

Steps to Implement:

  1. Construct an array that holds stack elements.
  2. Initialise a variable ‘top’ which holds an index of the topmost element of the array.
  3. Push operation → Insert an element at index top + 1 and set top to the new index.
  4. Pop operation → Take out the top element and make the top smaller.
  5. Peek operation → Return the element at the top and do not remove it.
  6. Overflow & Underflow
    • Overflow occurs when there are no free slots to add elements to the stack.
    • Underflow occurs when the stack and the elements are empty.

Example in Java:

class Stack {
    int[] arr;
    int top;
    int size;

    Stack(int size) {
        this.size = size;
        arr = new int[size];
        top = -1;
    }
    void push(int data) {
        if (top == size - 1) {
            System.out.println("Stack Overflow");
            return;
        }
        arr[++top] = data;
    }
    int pop() {
        if (top == -1) {
            System.out.println("Stack Underflow");
            return -1;
        }
        return arr[top--];
    }
    int peek() {
        return (top == -1) ? -1 : arr[top];
    }
}

This implementation also has a time complexity of O(1) for the push(), pop(), and peek() functions.

44. Array vs linked list – pros and cons.

Data management and storage with basic structures include arrays and linked lists. While linked list structures use nodes with pointers for faster insertion and deletion, arrays allow instant access via index ranges stored in contiguous array memory. The array is faster, but the final decision depends on operational needs, memory space, and access speed.

Aspect Array Linked List
Memory Allocation Static – Fixed size, decided at creation time Dynamic – Size grows or shrinks at runtime
Access Time O(1) – Direct access using index O(n) – Traversal needed to access elements
Insertion / Deletion Costly – Shifting elements required (O(n)) Efficient – Just change links (O(1) if position known)
Memory Usage Uses less memory since only data is stored Uses more memory due to extra storage for pointers
Cache Friendliness Better – Elements stored contiguously Poorer – Elements scattered in memory
Implementation Complexity Simpler to implement Slightly complex due to pointers
Use Case Best when frequent access and a fixed size are needed Best when frequent insertions/deletions are required

45. Singly linked list vs circular linked list.

A singly linked list is a linear data structure in which the last node points to null and each node contains data and a reference to the node after it.

Similar in nature, a circular linked list has a circle formed by the last node pointing back to the first node.

Aspect Singly Linked List Circular Linked List
Last Node Points to null Points back to the head
Traversal Cannot traverse back to the start Can traverse continuously
Memory Usage Slightly less memory Similar memory usage
Insertion/Deletion Slightly slower at the end (need to find the last node) Faster at the end since the last node is known
Use Case Good for linear data storage Good for circular data structures like round-robin scheduling

46. Write the Bubble sort algorithm.

The bubble sort algorithm is one of the most commonly used sorting algorithms, where we compare the two adjacent elements with each other. Here we can sort the data in both ascending and descending order. For instance, if I want to sort the data in ascending order, bubble sort will compare the first element with its neighbour element. If the first element is smaller than the next element, we will swap their positions and keep repeating the same with other adjacent pairs until the data is sorted

Example:

for (int i = 0; i < n - 1; i++) {
    for (int j = 0; j < n - i - 1; j++) {         
       if (arr[j] > arr[j + 1]) {
            // swap
        }
    }
}

47. Quicksort vs Merge sort – key differences.

Both Merge Sort and Quick Sort use the divide and conquer paradigm and are effective sorting algorithms. Since the data is divided and combined differently, the two algorithms have different performance characteristics, leading to different areas of use.

In Merge Sort, an unsorted list is divided into n sublists, each with one element. It then repeatedly merges sublists to produce new sorted sublists until there is only one sublist remaining.

Quick sort chooses a ‘pivot’ element from the array and divides the other elements into two sub-arrays based on whether they are less than or greater than the pivot. The sub-arrays are sorted recursively afterwards.

Aspect Quicksort Merge Sort
Approach Divide and Conquer using partitioning Divide and Conquer using merging
Worst-Case Time O(n²) (when pivot selection is poor) O(n log n) always
Average Time O(n log n) O(n log n)
Space Complexity O(1) (in-place) O(n) (needs extra space)
Stability Not stable by default Stable sorting algorithm
Performance Generally faster for small datasets Better for large datasets
Preferred When Memory is limited, and the dataset is small/medium Stability and handling large data are priorities

48. In Quicksort, how are elements swapped?

Elements are moved to the left or the right side of the array while the pivot is stored in a temporary variable during the comparison. Then, the pivot is deposited to its final resting place.

EPAM Java Interview Questions 

As a founding technology for EPAM, understanding Java concepts thoroughly is an important part of successfully completing the interview. Therefore, in this section, we have collected some of the most frequently asked Java interview questions at EPAM. These questions address OOP, collections, multithreading, algorithms, Java 8 features, and other topics relevant for targeted and confident performance in the technical interview rounds.

49. What are the ‘atomic’ and ‘volatile’ keywords in Java?

I’d say that ‘volatile’ guarantees that reads and writes of a variable occur to and from the main memory, ensuring visibility of changes across threads. But it does not guarantee atomicity. On the other hand, atomic classes such as AtomicInteger offer atomic operations like incrementAndGet() without needing explicit synchronisation; they enable thread-safe updates at the instruction level.

50. How does Java’s garbage collector work (especially in Java 8)?

Java’s garbage collection clears up unreferenced objects automatically. The G1 (Garbage First) collector was added in Java 8 G1, which aims to improve pause times by dividing the heap into regions and cleaning up the more garbage-filled ones first. I would explain how it does parallel and concurrent marking and then explain how it eliminates live objects in a scalable and low-latency approach.

51. Explain collection vs stream in Java 8.

A Collection is a data structure with capabilities to keep data in memory and to add, remove, or iterate over elements. A Stream, which is a new feature in Java 8, is a sequence of elements that supports operations in a functional style, such as filter, map, and reduce. Streams themselves do not store data; they are able to work on data processing pipelines, work in parallel, and support concise and expressive code.

52. What are the core OOP principles: inheritance, polymorphism, encapsulation, and abstraction?

Java has four major principles of Object Oriented Programming (OOP), which are:

  • Inheritance → Allows a class to obtain characteristics and behaviours of another class using the extends keyword.
    Example: A Car class inheriting from a Vehicle class.
  • Polymorphism → Allows methods to execute differently depending on the object invoking them. This is of two types.
    • Compile-time (method overloading)
    • Runtime (method overriding)
  • Encapsulation → A class containing methods and variables that control access to the methods externally. This is accomplished using the class’s private fields and the public getter and setter methods.
  • Abstraction → Carried out using abstract classes and interfaces, hiding details of the implementation and emphasising the system’s critical aspects, which are the features to be exposed.

53. What is the ‘super’ keyword in Java?

Answer:
We use the super keyword to:

  • Call the constructors of the parent class:
super();
  • Access parent class methods:
super.display();
  • When overridden, make reference to the parent class variables.

54. Abstract class vs interface – what’s the difference?

Unlike an interface, abstract classes can have methods that are fully implemented and can have a state. An interface has no state and mainly defines behaviour, though with Java 8 and above, interfaces can contain static or default methods. A class may extend one abstract class only, but can implement many interfaces.

Aspect Abstract Class Interface
Methods Can have abstract + concrete methods Only abstract methods (default/static allowed from Java 8)
Variables Can have instance + static variables Only public static final constants
Inheritance Single inheritance Multiple inheritance
Constructors Allowed Not allowed
Access Modifiers Methods can be public/protected/private. Methods are public by default
Use Case When classes share common code When defining a contract

55. How does multithreading benefit applications?

Multithreading improves responsiveness by allowing for parallel UI and data processing, or concurrently processing multiple client requests by a server.

56. How is a thread created in Java?

A thread can be created by subclassing Thread and overriding its run() method or by using Runnable (or Callable) and passing it to a Thread or an executor. The modern best practice for thread management is to use executors (e.g., ThreadPoolExecutor).

57. Write the Quicksort algorithm (pseudocode or code).

After choosing a pivot at random and dividing the array into elements that are less than and greater than it, Quicksort sorts the two sub-arrays recursively. It takes an average of O(n log n) time to sort in place.

Example:

function quicksort(arr, low, high):

    if low < high:

        p = partition(arr, low, high)

        quicksort(arr, low, p - 1)

        quicksort(arr, p + 1, high)

58. Best and worst-case time complexity of Quicksort.

With respect to a pivot, an array is split, reorganised, and modified with respect to the pivot. QuickSort is a divide-and-conquer type of sort. The performance is dictated by the pivot’s placement.

Best Case – O(n log n)

  • Occurs when the pivot splits the array in half.
  • Every time the array is split log n times, n elements are factored in.

Example: For instance, the middle element may be picked as a pivot in a fairly distributed manner.

Worst Case – O(n²)

  • Occurs when the pivot splits the elements in the array unevenly, with one side having the majority of elements.
  • In each step, the array continues to reduce by just one element, resulting in n recursive calls.

Example: For instance, an already sorted array in which the pivot can be the first or last element.

59. Write the Binary search algorithm.

int binarySearch(int[] arr, int key) {

    int low = 0, high = arr.length - 1;

    while (low ≤ high) {

        int mid = low + (high - low) / 2;

        if (arr[mid] == key) return mid;

        if (arr[mid] < key) low = mid + 1;

        else high = mid - 1;

    }

    return -1;

}

60. Best and worst-case time complexity for Binary search.

To find an element in a sorted array, Binary Search repeatedly divides the search range in half.

Best Case – O(1) 

  • It is when the middle element is the target.
  • The element is found in a single comparison.

Worst Case – O(log n)

  • It is when the element is at the end of the search space or is absent.
  • The search space is halved each time, so at worst, it takes log₂(n) steps.

61. Why does Quicksort degrade to O(n²), and how to avoid it?

Quicksort in the worst case is when the pivot makes the worst possible split by choosing, for example, the smallest or largest element in the sub-parts. This is mitigated by randomising pivot selection or median-of-three, which guarantees balanced splits.

EPAM Interview Questions for Automation Testing

Automation testing at EPAM deals with understanding frameworks, tools, and scripting at a practical level. Hands-on experience with Selenium, TestNG, API testing, reporting, and CI/CD integration will be required. Here, with flowing context, are some of the typical questions with their answers:

62. Define your test automation framework (POM, hybrid).

In the current project, I have developed a hybrid automation framework using the Page Object Model (POM) coupled with data-driven testing using Excel files. 

  • POM design keeps the locators and the actions in different classes, which increases the readability and the reusability of the code.
  • TestNG was also integrated for the execution of the tests and for reporting.
  • I applied Maven for building and managing the project dependencies.
  • Moreover, I used Log4j for logging and Extent Reports for rich HTML reporting.

This strategy assisted in the implementation of a framework that is scalable, modular, and easy to maintain.

63. How do you select subsets of tests via TestNG groups?

In TestNG, we are able to group test cases and run specific sets of tests. For example:

@Test(groups = {"regression"})

public void testPaymentGateway() {

    // test steps

}

Next in the testng.xml file, I include the specific groups I would like to run:

<groups>

      <run>
              
            <include name="regression"/>

      </run>

</groups>   

I have managed microservices testing in EPAM, during which we would have to contain regression, sanity, and API tests depending on the part of the deployment cycle.

64. Let’s discuss some screenshot capture strategies, test data, and reports

In Selenium-based automation, I take care of test failures by capturing screenshots with the TakesScreenshot interface. The final HTML report includes a direct link to the screenshots because I also integrated it with Extent Reports.

For test data, I’ve used both:

  • Excel sheets using Apache POI
  • JSON and CSV files for API payloads

As for test reporting, I use Extent and Allure Reports because of their comprehensive reporting with useful insights, visual logs, and trends, simplifying the debugging and preparation for client demonstrations.

65. Use of HTTP methods and authentication in API testing

I use RestAssured in EPAM as the main tool for API automation. I also use GET, POST, PUT, and DELETE methods extensively.

As part of my authentication, I’ve put:

  • Basic Auth using auth().basic(username, password)
  • Bearer Token authentication using .header(“Authorization”, “Bearer <token>”)

Automating OAuth 2.0 token generation for secured API access was one of the projects I worked on. This significantly replaced the manual refresh of tokens and automated the testing for APIs.

66. How do you handle dynamic web elements in Selenium?

When dealing with dynamic components, I make use of WebDriverWait along with ExpectedConditions to perform an explicit wait until the element is available or it can be clicked.

Example:

WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(10));

wait.until(ExpectedConditions.elementToBeClickable(By.id("submitBtn"))).click();

For dynamic IDs and dynamic attribute values, I have used XPath with contains() or starts-with().

67. How do you integrate Selenium with Jenkins for CI/CD? 

I have integrated Selenium test suites with Jenkins by creating a Maven job and attaching the pom.xml file. Whenever there is a code commit, Jenkins invokes the test suite automatically.

Additionally, I set up Jenkins to publish Extent Reports and email notifications directly. Faster feedback and more seamless CI/CD pipelines were guaranteed by this configuration.

68. How do you manage cross-browser testing? 

I used Selenium Grid and TestNG parameters to perform cross-browser testing, where in testng.xml I declare the browser as a parameter.

<parameter name="browser" value="chrome"/>

After that, in my test class,

@BeforeTest

@Parameters("browser")

public void setUp(String browser) {

    if(browser.equalsIgnoreCase("chrome")) {

        driver = new ChromeDriver();

    } else if(browser.equalsIgnoreCase("firefox")) {

        driver = new FirefoxDriver();

    }

}

This practice helped us to confirm that the application was stable on Chrome, Firefox, and Edge.

Conclusion

The focus of an interview with EPAM goes beyond surface-level responses to real-world contexts, along with distinct and clear communication skills. Whether automation testing, Java development, or data engineering, the answer lies in mastering the fundamentals of the concepts and work, practical application, and minimalistic coding approaches.

An EPAM interview is not about checking boxes and preparing with the fundamentals. It is about improving the process and justifying your approach. It involves finding the most efficient way to solve problems and being able to articulate these tactics.

 

About the Author

Senior Associate - Digital Marketing

Shailesh is a Senior Editor in Digital Marketing with a passion for storytelling. His expertise lies in crafting compelling brand stories; he blends his expertise in marketing with a love for words to captivate audiences worldwide. His projects focus on innovative digital marketing ideas with strategic thought and accuracy.

Advanced Data Science AI