Tech Mahindra interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Tech Mahindra
upvote
share-icon
1 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Java, Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date17 Aug 2021
Coding problem4

This was a technical round with questions on Java.

1. Java Question

What are the features of Java 8?

Problem approach

Java 8 provides following features for Java Programming :


1. Lambda expression helps us to write our code in functional style. It provides a clear and concise way to implement SAM interface(Single Abstract Method) by using an expression. It is very useful in collection library in which it helps to iterate, filter and extract data.


2. An Interface that contains only one abstract method is known as functional interface. It can have any number of default and static methods. It can also declare methods of object class. Functional interfaces are also known as Single Abstract Method Interfaces (SAM Interfaces).
 

3. Java introduced a new class Optional in Java 8. It is a public final class which is used to deal with NullPointerException in Java application. We must import java.util package to use this class. It provides methods to check the presence of value for particular variable.
 

4. Java has introduced a new Date and Time API since Java 8. The java.time package contains Java 8 Date and Time classes.
 

5. Java provides a facility to create default methods inside the interface. Methods which are defined inside the interface and tagged with default keyword are known as default methods. These methods are non-abstract methods and can have method body.

2. Java Question

What is a string?

Problem approach

A Java string is a sequence of characters that exist as an object of the class java.lang. Java strings are created and manipulated through the string class. Once created, a string is immutable -- its value cannot be changed.

Methods of class String enable :
Examining individual characters in the string.
Comparing strings.
Searching strings.
Copying strings with characters converted from upper to lower case or vice versa.

3. Java Question

Explain the concept of threads.

Problem approach

Threads allows a program to operate more efficiently by doing multiple things at the same time. Threads can be used to perform complicated tasks in the background without interrupting the main program.


There are two ways to create a thread. It can be created by extending the Thread class and overriding its run() method :


1. Extend Syntax
public class Main extends Thread {
public void run() {
System.out.println("This code is running in a thread");
}
}


2. Another way to create a thread is to implement the Runnable interface :
Implement Syntax
public class Main implements Runnable {
public void run() {
System.out.println("This code is running in a thread");
}
}

4. Java Question

Explain call by value.

Problem approach

Call by Value means calling a method with a parameter as value. Through this, the argument value is passed to the parameter. In call by value, the modification done to the parameter passed does not reflect in the caller's scope.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is 3 + 2 * 4 based on operator precedence?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Tech Mahindra
0 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Tech Mahindra
0 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Tech Mahindra
2057 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Tech Mahindra
1279 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
2695 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2040 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes