i
Tech Mahindra
Filter interviews by
I applied via Recruitment Consulltant and was interviewed before Sep 2021. There was 1 interview round.
I applied via Naukri.com and was interviewed in Mar 2022. There was 1 interview round.
Set is an unordered collection of unique elements while list is an ordered collection of elements. Throw is used to throw an exception while throws is used to declare an exception.
Set does not allow duplicate elements while list can have duplicates.
Set does not maintain the order of elements while list maintains the order.
Throw is used to explicitly throw an exception in a method while throws is used to declare the exc...
I was interviewed before May 2020.
posted on 22 Oct 2024
I applied via Naukri.com and was interviewed in Mar 2024. There were 2 interview rounds.
Program to find 2nd highest number in array without sorting.
Iterate through array to find highest and second highest numbers
Initialize variables to store highest and second highest numbers
Compare each element with highest and second highest numbers
Program to add values into a hashmap in Java.
Create a new HashMap object.
Use the put() method to add key-value pairs into the hashmap.
Keys must be unique, values can be duplicated.
Example: HashMap
Main concepts of OOPS in Java include inheritance, encapsulation, polymorphism, and abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class. Example: class B extends class A.
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 of a method to do different things ba...
Different HTTP codes used in Rest Assured
200 - OK: Request was successful
201 - Created: Request was successful and a new resource was created
400 - Bad Request: Request was invalid
401 - Unauthorized: Request requires user authentication
404 - Not Found: Requested resource was not found
500 - Internal Server Error: Server encountered an unexpected condition
Code using Rest Assured for checking status code
Import Rest Assured library
Use given() method to specify the base URI
Use when() method to specify the HTTP method and endpoint
Use then() method to validate the status code
I applied via Naukri.com and was interviewed in Mar 2024. There were 2 interview rounds.
Maven Life Cycle is a sequence of phases that define the order in which goals are executed to build and deploy a Maven project.
Maven Life Cycle consists of three main phases: clean, default, and site.
Each phase consists of a series of goals that are executed in a specific order.
You can run a specific phase or goal using the command 'mvn
Test data can be passed to tests using data-driven testing approach, parameterization, test data files, or test data generation.
Use data-driven testing approach to pass test data from external sources like Excel sheets, databases, or CSV files.
Parameterize test data by defining variables in test scripts or test cases.
Store test data in separate test data files and read them during test execution.
Generate test data dyna...
Array is a fixed-size data structure while ArrayList is a dynamic-size data structure in Java.
Array is a fixed-size collection of elements of the same data type, while ArrayList is a dynamic-size collection that can grow or shrink as needed.
Arrays can store primitive data types and objects, while ArrayList can only store objects.
Arrays require a specified size during initialization, while ArrayList can dynamically resi...
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 and one null key, while Hashtable does not allow null keys or values.
HashMap is generally preferred for non-thread-safe applications, while Hashtable is used in thread-safe...
posted on 16 Feb 2024
I applied via Referral and was interviewed in Jan 2024. There was 1 interview round.
Assertions in Selenium are used to verify the expected outcome of a test. They help in validating the correctness of the application under test.
Assertions are used to compare the actual and expected values in a test
They help in identifying if the test has passed or failed
Assertions can be used to validate elements, text, attributes, etc.
Handling assertions involves using assertion methods provided by Selenium or test f...
This program reverses a given string.
Use a loop to iterate through each character of the string.
Create a new string and append each character from the original string in reverse order.
Return the reversed string as the output.
Functional testing verifies that the software meets the specified requirements, while regression testing ensures that the existing functionality is not affected by new changes.
Functional testing focuses on testing the individual functions or features of the software.
Regression testing is performed to ensure that the existing functionality is not broken after making changes or adding new features.
Functional testing is u...
Selenium is a popular open-source automation testing tool used for web application testing.
Selenium supports multiple programming languages like Java, Python, C#, etc.
It allows testers to write test scripts in a variety of IDEs like Eclipse, IntelliJ, etc.
Selenium can automate interactions with web browsers like Chrome, Firefox, etc.
It can perform various testing tasks such as form filling, button clicking, data extrac
Selenium is a suite of tools used for automating web browsers.
Selenium IDE: Record and playback tool for creating automated tests
Selenium WebDriver: Automation tool for writing test scripts in various programming languages
Selenium Grid: Distributes test execution on multiple machines for parallel testing
Selenium RC (Remote Control): Deprecated tool for running tests in multiple browsers
findelement is a method used in Selenium to locate a single web element on a webpage, while findelements is used to locate multiple web elements.
findelement returns the first matching element found on the webpage
findelements returns a list of all matching elements found on the webpage
findelement is used when only one element needs to be located, while findelements is used when multiple elements need to be located
Different types of wait include implicit, explicit, and fluent waits in automation testing.
Implicit wait: Waits for a certain amount of time before throwing a NoSuchElementException if the element is not found.
Explicit wait: Waits for a certain condition to be met before proceeding further in the code.
Fluent wait: Waits for a condition to be met with a defined polling frequency and timeout.
Example: Using implicit wait ...
Close is used to close a window or application, while wait is used to pause the execution for a specified amount of time.
Close is used to close a window or application after the test is completed
Wait is used to pause the execution for a specified amount of time, such as waiting for an element to load before proceeding
Example: driver.close() will close the current window, while Thread.sleep(5000) will pause the executio
I applied via Approached by Company and was interviewed in Apr 2024. There was 1 interview round.
posted on 6 Apr 2024
The second non-repetitive character is to be found in a given array of strings.
Iterate through each character in the strings and count their occurrences
Identify the characters that occur only once
Return the second non-repetitive character
based on 4 reviews
Rating in categories
Software Engineer
26.3k
salaries
| ₹2 L/yr - ₹9.1 L/yr |
Senior Software Engineer
21.2k
salaries
| ₹5.5 L/yr - ₹22.5 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