Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Tech Mahindra Team. If you also belong to the team, you can get access from here

Tech Mahindra Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Tech Mahindra Java Trainee Interview Questions and Answers

Updated 11 Feb 2022

Tech Mahindra Java Trainee Interview Experiences

1 interview found

Java Trainee Interview Questions & Answers

user image Anonymous

posted on 11 Feb 2022

Round 1 - HR 

(1 Question)

  • Q1. Tell me about yourself.

Interview Preparation Tips

Interview preparation tips for other job seekers - I am JaiMangal I live in the sirsa haryana

Interview questions from similar companies

Interview experience
5
Excellent
Difficulty level
Easy
Process Duration
4-6 weeks
Result
Selected Selected

I applied via Naukri.com and was interviewed in Aug 2023. There were 4 interview rounds.

Round 1 - Resume Shortlist 
Pro Tip by AmbitionBox:
Keep your resume crisp and to the point. A recruiter looks at your resume for an average of 6 seconds, make sure to leave the best impression.
View all tips
Round 2 - Aptitude Test 

Reasoning, logical , verbal, numbers

Round 3 - HR 

(1 Question)

  • Q1. What's ur sweet memory in ur life
Round 4 - Technical 

(1 Question)

  • Q1. What is java, oops concept, data types..
  • Ans. 

    Java is a popular programming language known for its object-oriented programming (OOP) concepts and various data types.

    • Java is a high-level programming language used for developing applications and software.

    • Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data in the form of fields and code in the form of procedures.

    • Data types in Java include primitive data ...

  • Answered by AI

Skills evaluated in this interview

I applied via Naukri.com and was interviewed before Sep 2020. There were 4 interview rounds.

Interview Questionnaire 

1 Question

  • Q1. Details about your project

Interview Preparation Tips

Interview preparation tips for other job seekers - worst organization Everything depends on moody interviewer how much good you at coding they judge on there terms thats it
Interview experience
1
Bad
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Not Selected

I was interviewed in Jan 2025.

Round 1 - Coding Test 

A sequence was provided: 4181, 2684, 1597, 987, 610.
first 2 are given and write code for other value calculation using java 8

The second question required writing a reverse of a palindrome using both Java 8 streams. I was able to successfully write both and clear the first round.

Round 2 - Technical 

(6 Questions)

  • Q1. Interviewer was himself not knowing anything as it was walkin drive he was sitting infront of me and checking questions on phone Introduction that he inturrepted in between when I was introducing myself
  • Q2. What are the features of Java 17, specifically related to sealed classes, including their syntax and necessity, along with the potential errors encountered when invoking a sealed class?
  • Ans. 

    Java 17 introduces sealed classes to restrict inheritance and improve code maintainability.

    • Sealed classes are declared using the 'sealed' keyword followed by the permitted subclasses.

    • Subclasses of a sealed class must be either final or sealed themselves.

    • Errors may occur when trying to extend a sealed class with a non-permitted subclass.

  • Answered by AI
  • Q3. Java 8 feathers stream api, functional interface, Intermittent operator ,Ternary operator, Prediction,Bi predicate. Answered all successfully
  • Q4. Draw low level design of implementation of notify me if item is back in stock in a ecommerce application
  • Ans. 

    Implementation of 'notify me if item is back in stock' feature in an ecommerce application

    • Create a database table to store user notifications for out-of-stock items

    • Implement a service to check item availability and send notifications to subscribed users

    • Provide a user interface for users to subscribe to notifications for specific items

  • Answered by AI
  • Q5. All design patterns which I know. Asked me to implement adapter pattern on paper
  • Q6. Then given a problem that concurrent way perform operation on excell to decrease the response time

Interview Preparation Tips

Interview preparation tips for other job seekers - I always suggest staying away from these companies commonly referred to as WITCH (Wipro, Infosys, TCS, Cognizant, HCL). You will rarely encounter good interviewers there unless there is an extreme necessity. Interview was judging me on the basis of syntex by seeing in his phone. How can everyone write each and everything on copy. For the low level design first time in my 6 years carrier someone asked to design without using kafka or any other library like spring boot to achieve that add in reminder list problem 😂. At first it was my bad after holding a offer of almost 27 lakh I somehow agreed for giving interview. Second thing I also know that after Even clearing they cannot afford 30LPA which I asked. I just went there because from last 6.5 year I have never attended any walking or face to face interview so was curious for it. Currently also working with somewhat premium product development company only. My experience was very bad. May be it can get vary person to person.
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
-
Result
-

I was interviewed in Jan 2025.

Round 1 - Technical 

(8 Questions)

  • Q1. Difference between HashMap and TreeMap? Internal working of HashMap?
  • Q2. Functional Interface?
  • Q3. Singleton Class?
  • Q4. What is Eureka Server?
  • Q5. How to handle Exception in SpringBoot?
  • Q6. Find the average sal of employee in each department using java 8 Stream?
  • Q7. What is circuit Breaker?
  • Q8. What is docker and kubernates?
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Company Website and was interviewed in Nov 2024. There were 2 interview rounds.

Round 1 - Technical 

(7 Questions)

  • Q1. Create one Spring boot controller from end to end. No need to create a spring boot project we just want to see the structure and end to end implementation.
  • Q2. Write a java 8 program to get the characters from a string whose count is 2 or more than 2 e.g. input: baseball , output: b, a, l.
  • Q3. Why you left your previous organization.
  • Q4. What is the functional interface
  • Q5. What are the OOPS concepts. and some questions related to inheritance.
  • Q6. Asked about the project mentioned in CV (Client project) and asked its architecture.
  • Q7. Various SQL join types
Round 2 - HR 

(3 Questions)

  • Q1. Are you ready to relocate to job location
  • Q2. Why are you leaving your previous organization.
  • Q3. Expectation about salary

Interview Preparation Tips

Interview preparation tips for other job seekers - Do your basics strong, and keep hands on problems.
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
No response

I applied via Walk-in and was interviewed in Nov 2024. There were 3 interview rounds.

Round 1 - Coding Test 

It's walkin, so they conducted 1 technical mcqs round.

Round 2 - Technical 

(11 Questions)

  • Q1. Multi threading
  • Q2. Internal working of hashmap
  • Ans. 

    HashMap in Java is a data structure that stores key-value pairs and uses hashing to efficiently retrieve values based on keys.

    • HashMap uses an array of buckets to store key-value pairs.

    • Keys are hashed to determine the index in the array where the key-value pair will be stored.

    • In case of hash collisions, a linked list or a balanced tree is used to store multiple key-value pairs in the same bucket.

    • HashMap allows null keys...

  • Answered by AI
  • Q3. Spring batch related
  • Q4. Non repeating characters in a array
  • Ans. 

    Function to find and return all non-repeating characters in an array of strings.

    • Iterate through the array and count the occurrences of each character using a HashMap.

    • Then iterate through the array again and check if the count of each character is 1, if so add it to the result list.

    • Return the list of non-repeating characters.

  • Answered by AI
  • Q5. 3rd highest salary
  • Ans. 

    To find the 3rd highest salary in a database, we can use a SQL query with the 'LIMIT' and 'OFFSET' keywords.

    • Use a SQL query with 'ORDER BY salary DESC' to sort the salaries in descending order.

    • Use 'LIMIT 1 OFFSET 2' to skip the first two highest salaries and retrieve the third highest salary.

    • Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1 OFFSET 2;

  • Answered by AI
  • Q6. Qualifier vs primary
  • Ans. 

    A qualifier in Java is used to specify additional information about a primary, which is the main data type or variable.

    • A primary in Java is the main data type or variable, while a qualifier provides additional information about the primary.

    • Qualifiers can be used to modify the behavior or characteristics of a primary.

    • For example, in Java, 'final' is a qualifier that can be used to make a variable constant.

  • Answered by AI
  • Q7. Controller vs restcontroller
  • Ans. 

    The main difference is that @RestController is a specialized version of @Controller that is used for RESTful web services.

    • Both @Controller and @RestController are used in Spring MVC to handle HTTP requests, but @RestController is specifically used for RESTful web services.

    • @Controller is used to create web pages, while @RestController is used to return data in JSON or XML format.

    • @RestController is a convenience annotati...

  • Answered by AI
  • Q8. Spring boot annotataions
  • Q9. Oops concepts with examples
  • Ans. 

    OOP concepts include inheritance, encapsulation, polymorphism, and abstraction.

    • Inheritance: Allows a class to inherit properties and behavior from another class. Example: class Dog extends Animal.

    • Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: private variables with public getter and setter methods.

    • Polymorphism: Ability for objects to be treated as instances of their paren...

  • Answered by AI
  • Q10. Spring batch configuration
  • Q11. They covered all java, spring and Microservices
Round 3 - Technical 

(4 Questions)

  • Q1. Microservices architecture
  • Q2. How do Microservices communicate
  • Ans. 

    Microservices communicate with each other through various communication protocols like HTTP, messaging queues, and gRPC.

    • Microservices can communicate over HTTP using RESTful APIs.

    • Messaging queues like RabbitMQ or Kafka can be used for asynchronous communication between microservices.

    • gRPC is a high-performance, open-source RPC framework that can be used for communication between microservices.

    • Service discovery mechanism...

  • Answered by AI
  • Q3. How to access the Microservice end point
  • Ans. 

    Microservice endpoints can be accessed using HTTP requests with the appropriate URL

    • Use HTTP methods like GET, POST, PUT, DELETE to interact with the microservice

    • Construct the URL with the base URL of the microservice and the specific endpoint path

    • Include any necessary headers or parameters in the request for authentication or data filtering

  • Answered by AI
  • Q4. Why we use microservices
  • Ans. 

    Microservices allow for modular, scalable, and flexible software development by breaking down applications into smaller, independent services.

    • Microservices enable easier maintenance and updates as each service can be developed, deployed, and scaled independently.

    • They improve fault isolation, as failures in one service do not necessarily affect the entire application.

    • Microservices promote agility and faster time-to-mark...

  • Answered by AI

Skills evaluated in this interview

Interview experience
4
Good
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Not Selected

I applied via Walk-in and was interviewed in Nov 2024. There was 1 interview round.

Round 1 - Technical 

(4 Questions)

  • Q1. Given an array {1, 2, 1, 4, 5, 4, 8, 7}, how can you use Streams to remove duplicates while retaining only the even numbers?
  • Ans. 

    Use Streams to remove duplicates and retain only even numbers from an array.

    • Convert the array to a stream using Arrays.stream()

    • Use distinct() to remove duplicates

    • Filter out odd numbers using filter()

    • Collect the result using collect(Collectors.toList())

  • Answered by AI
  • Q2. What is the use of Static and final when you will use Static methods
  • Ans. 

    Static methods can be accessed without creating an instance of the class, while final keyword makes the method unchangeable.

    • Static methods belong to the class itself, not to any specific instance

    • Final keyword ensures that the method cannot be overridden in subclasses

    • Static methods are commonly used for utility methods that do not require access to instance variables

    • Example: Math class in Java has static methods like Ma

  • Answered by AI
  • Q3. What is the difference between @restController and @controller Annotation
  • Ans. 

    The @RestController annotation is used to define RESTful web services while @Controller annotation is used to define MVC controller.

    • RestController is a specialized version of Controller used for RESTful web services

    • RestController eliminates the need for @ResponseBody annotation

    • Controller is used for traditional MVC controller functionality

    • RestController returns data directly without needing to go through a view resolve...

  • Answered by AI
  • Q4. What is microservices why we use it
  • Ans. 

    Microservices are a software development technique where applications are composed of small, independent services that communicate with each other.

    • Microservices allow for easier scalability and maintenance of complex applications.

    • Each service in a microservices architecture can be developed, deployed, and scaled independently.

    • Microservices promote flexibility and agility in software development.

    • Examples of companies us...

  • Answered by AI

Interview Preparation Tips

Topics to prepare for Cognizant Senior Java Developer interview:
  • Java SpringBoot
Interview preparation tips for other job seekers - Need to have strong knowledge on basics Java Spring boot and Microservices
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
-

I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.

Round 1 - Technical 

(3 Questions)

  • Q1. What are intermediate and terminal operations
  • Ans. 

    Intermediate operations transform the elements of a stream, while terminal operations produce a result or side-effect.

    • Intermediate operations include map, filter, sorted, distinct, etc.

    • Terminal operations include forEach, collect, reduce, count, etc.

    • Intermediate operations are lazy and do not execute until a terminal operation is called.

    • Terminal operations trigger the processing of the stream and produce a result.

  • Answered by AI
  • Q2. Predefined functional interface
  • Q3. Ways to create Thread
  • Ans. 

    Ways to create Thread in Java

    • Extending the Thread class

    • Implementing the Runnable interface

    • Using Executor framework

  • Answered by AI

Interview Preparation Tips

Interview preparation tips for other job seekers - It was moderate level of interview
Interview experience
1
Bad
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Not Selected

I applied via Recruitment Consulltant and was interviewed in Nov 2024. There were 2 interview rounds.

Round 1 - Coding Test 

The first round was an interview conducted with a GENAI virtual bot.

Round 2 - One-on-one 

(2 Questions)

  • Q1. Internal architecture of Spring boot, how enable autoconfiguration works
  • Ans. 

    Spring Boot uses autoconfiguration to automatically configure the Spring application based on dependencies and properties.

    • Spring Boot autoconfiguration is achieved through @EnableAutoConfiguration annotation

    • Autoconfiguration classes are located in the org.springframework.boot.autoconfigure package

    • Autoconfiguration classes are conditionally applied based on the presence of specific classes or properties

  • Answered by AI
  • Q2. Questions mostly on microservices and coding question on restTemplate

Interview Preparation Tips

Topics to prepare for Wipro Senior Java Developer interview:
  • Java
  • Spring Boot
  • Microservices
  • REST API

Tech Mahindra Interview FAQs

How many rounds are there in Tech Mahindra Java Trainee interview?
Tech Mahindra interview process usually has 1 rounds. The most common rounds in the Tech Mahindra interview process are HR.

Tell us how to improve this page.

Interview Questions from Similar Companies

TCS Interview Questions
3.7
 • 10.4k Interviews
Accenture Interview Questions
3.8
 • 8.2k Interviews
Infosys Interview Questions
3.6
 • 7.6k Interviews
Wipro Interview Questions
3.7
 • 5.6k Interviews
Cognizant Interview Questions
3.8
 • 5.6k Interviews
Capgemini Interview Questions
3.7
 • 4.8k Interviews
HCLTech Interview Questions
3.5
 • 3.8k Interviews
Genpact Interview Questions
3.8
 • 3.1k Interviews
LTIMindtree Interview Questions
3.8
 • 3k Interviews
IBM Interview Questions
4.0
 • 2.4k Interviews
View all

Tech Mahindra Java Trainee Reviews and Ratings

based on 2 reviews

5.0/5

Rating in categories

5.0

Skill development

4.5

Work-life balance

4.5

Salary

4.5

Job security

4.5

Company culture

4.5

Promotions

5.0

Work satisfaction

Explore 2 Reviews and Ratings
Software Engineer
26.3k salaries
unlock blur

₹2 L/yr - ₹9.1 L/yr

Senior Software Engineer
21.3k salaries
unlock blur

₹5.5 L/yr - ₹23.2 L/yr

Technical Lead
11.6k salaries
unlock blur

₹9.2 L/yr - ₹31.5 L/yr

Associate Software Engineer
5.4k salaries
unlock blur

₹1.8 L/yr - ₹6 L/yr

Team Lead
4.9k salaries
unlock blur

₹5.1 L/yr - ₹17 L/yr

Explore more salaries
Compare Tech Mahindra with

Infosys

3.6
Compare

Cognizant

3.8
Compare

Accenture

3.8
Compare

Wipro

3.7
Compare
Did you find this page helpful?
Yes No
write
Share an Interview