i
Tech Mahindra
Filter interviews by
I applied via Referral and was interviewed in Jan 2022. There was 1 interview round.
posted on 30 Sep 2023
I applied via Naukri.com and was interviewed in Aug 2022. There were 3 interview rounds.
Java is a high-level programming language used to develop applications that can run on any platform.
Java code is compiled into bytecode that can run on any platform with a Java Virtual Machine (JVM)
JVM acts as an interpreter and translates bytecode into machine code
Java's platform independence is achieved through the 'Write Once, Run Anywhere' (WORA) principle
Java's standard library provides platform-independent APIs f
Java 8 introduced several new features including lambda expressions, streams, and default methods.
Lambda expressions for functional programming
Streams for efficient processing of large data sets
Default methods for backward compatibility
Date and Time API for improved handling of date and time
Nashorn JavaScript engine for improved performance
Type annotations for improved type checking
Parallel array sorting for improved p...
Serialization is the process of converting an object into a stream of bytes to store or transmit it.
Serialization is used to save and restore object states
Java provides Serializable interface to implement serialization
Serialization can be used for inter-process communication and distributed systems
Deserialization is the process of converting a stream of bytes back into an object
Serialization can be customized using rea
Static variable is a variable that belongs to the class and not to the instance of the class.
Static variables are declared using the 'static' keyword.
They are initialized only once, at the start of the program.
They can be accessed using the class name, without creating an instance of the class.
Changes made to a static variable are reflected across all instances of the class.
Example: 'public static int count = 0;'
Collections are a group of classes and interfaces used to store and manipulate groups of objects in Java.
Collections provide a way to store and manipulate groups of objects in Java
They offer various data structures like List, Set, Map, etc.
Collections provide methods to add, remove, and search for elements in the data structures
They also offer algorithms for sorting and searching elements
Examples include ArrayList, Has
ResultSet is an interface in Java used to retrieve data from a database. It should be avoided due to its performance issues.
ResultSet is used to retrieve data from a database in Java
It has performance issues and should be avoided if possible
Alternative options like JPA or Hibernate can be used instead
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
I applied via Referral and was interviewed in Nov 2024. There were 2 interview rounds.
I applied via Naukri.com and was interviewed in Dec 2024. There was 1 interview round.
Java 8 introduced lambda expressions, Java 11 added local-variable syntax for lambda parameters, and Java 17 included sealed classes and pattern matching.
Java 8 introduced lambda expressions for functional programming.
Java 11 added local-variable syntax for lambda parameters to simplify code.
Java 17 included sealed classes to restrict inheritance and pattern matching for instanceof checks and type casts.
Count the number of words in a given string.
Split the string by spaces and count the number of resulting elements.
Handle edge cases like multiple spaces or empty strings.
Consider punctuation marks as part of words unless specified otherwise.
I applied via Walk-in and was interviewed in Nov 2024. There were 3 interview rounds.
It's walkin, so they conducted 1 technical mcqs round.
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...
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.
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;
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.
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...
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...
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...
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
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...
I applied via Walk-in and was interviewed in Nov 2024. There was 1 interview round.
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())
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
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...
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...
I applied via Recruitment Consulltant and was interviewed in Nov 2024. There were 2 interview rounds.
The first round was an interview conducted with a GENAI virtual bot.
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
I applied via Naukri.com and was interviewed in Nov 2024. There was 1 interview round.
HashMap is non-synchronized and allows null values, while HashTable is synchronized and does not allow null values.
HashMap is non-synchronized, meaning it is not thread-safe, while HashTable is synchronized and thread-safe.
HashMap allows null values for both keys and values, while HashTable does not allow null keys or values.
HashMap is generally preferred for non-thread-safe applications, while HashTable is used in mul
Software Engineer
26.4k
salaries
| ₹2 L/yr - ₹9 L/yr |
Senior Software Engineer
21.2k
salaries
| ₹5.4 L/yr - ₹22.7 L/yr |
Technical Lead
11.5k
salaries
| ₹9.2 L/yr - ₹37 L/yr |
Associate Software Engineer
5.2k
salaries
| ₹1.8 L/yr - ₹6 L/yr |
Team Lead
4.9k
salaries
| ₹5.1 L/yr - ₹16.8 L/yr |
Infosys
Cognizant
Accenture
Wipro