i
HCLTech
Filter interviews by
I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.
The output of the code will be 'animal is created' followed by 'Dog is created'.
The code defines a class Animal with a constructor that prints 'animal is created'.
It also defines a class Dog that extends Animal, with a constructor that prints 'Dog is created'.
In the main method, an instance of Dog is created, which will trigger the constructors of both Animal and Dog classes.
The output will be 'HelloThere'
Concatenation of 'Hello' and 'There' results in 'HelloThere'
The final string is printed using System.out.println()
The code creates a StringBuffer object with 'Hello' and appends 'There' to it before printing the final string.
StringBuffer is mutable, so the original 'Hello' string can be modified
The append() method adds the specified string to the end of the buffer
The final output will be 'HelloThere'
Option a is valid, option b is valid, option c is invalid.
Option a is valid because ChromeDriver is a subclass of WebDriver, so it can be assigned to a WebDriver reference.
Option b is valid because ChromeDriver is a subclass of WebDriver, so it can be instantiated using a WebDriver reference.
Option c is invalid because WebDriver is an interface and cannot be instantiated directly. It can only be used as a reference typ
Sort input array of strings in descending order without using inbuilt functions
Iterate through the array and compare each element with the rest to find the largest element
Swap the largest element with the first element, then repeat the process for the remaining elements
Continue this process until the array is sorted in descending order
findElement returns the first matching element on the page, while findElements returns a list of all matching elements.
findElement returns a single WebElement matching the locator provided
findElements returns a list of WebElements matching the locator provided
findElement will throw NoSuchElementException if no element is found, while findElements will return an empty list
getwindowhandle returns the handle of the current window, getwindowhandles() returns handles of all open windows
getwindowhandle returns a single window handle, while getwindowhandles() returns a set of window handles
getwindowhandle is used to switch between windows in Selenium WebDriver
Output type of getwindowhandle is String, while output type of getwindowhandles() is Set
String is immutable, while StringBuilder is mutable and more efficient for concatenating strings.
String is immutable, meaning its value cannot be changed once it is created.
StringBuilder is mutable, allowing for modifications to the string without creating a new object.
StringBuilder is more efficient for concatenating multiple strings as it does not create new objects each time.
Example: String str = "Hello"; StringBuil
I applied via Recruitment Consulltant and was interviewed in Apr 2024. There was 1 interview round.
Find the 2nd largest number in the given array
Sort the array in descending order
Get the element at index 1, which will be the 2nd largest number
The combined characters in the given testing example 'Testing Testing Testing' is 'te'.
Iterate through the text and check for consecutive characters 'te'.
Combine the characters 'te' whenever they are found together.
Return the combined text 'te' as the result.
I applied via Naukri.com and was interviewed before Jul 2021. There were 2 interview rounds.
HCLTech interview questions for designations
What people are saying about HCLTech
I applied via Campus Placement and was interviewed in Oct 2020. There were 4 interview rounds.
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Start from the first element and compare it with the next element
If the next element is smaller, swap them
Repeat this process for all elements in the array
Continue this process until no more swaps are needed
A program to print all prime numbers
Take input from user for range of numbers
Loop through the range and check if each number is prime
Print the prime numbers
Hashmap is a data structure that stores key-value pairs and allows constant time access to values based on their keys.
Hashmap uses a hash function to map keys to indices in an array.
Collisions can occur when multiple keys map to the same index, which can be resolved using techniques like chaining or open addressing.
Examples of hashmap implementations include Java's HashMap class and Python's dict type.
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class and can also add new properties and methods.
For...
I applied via Company Website and was interviewed in Dec 2020. There was 1 interview round.
I applied via Superset and was interviewed before Aug 2021. There were 2 interview rounds.
Aptitude consists of general thinking, pseudo code, and game aptitude
Delegate responsibilities and establish clear communication channels for team members to handle situations in my absence.
Assign clear roles and responsibilities to each team member
Establish communication channels and protocols for emergencies
Ensure team members have access to necessary resources and information
Provide training and support to team members to handle unexpected situations
Regularly check in with team membe...
I applied via Company Website and was interviewed in May 2021. There was 1 interview round.
A table in SQL is a collection of related data organized in rows and columns.
Tables are used to store data in a structured way.
Each table has a unique name and consists of columns and rows.
Columns define the type of data that can be stored in them.
Rows represent individual records in the table.
Tables can be queried using SQL commands to retrieve, insert, update or delete data.
Some of the top questions asked at the HCLTech Automation Engineer interview -
based on 4 interviews
1 Interview rounds
based on 8 reviews
Rating in categories
Software Engineer
23.4k
salaries
| ₹1.9 L/yr - ₹8 L/yr |
Technical Lead
21.5k
salaries
| ₹7 L/yr - ₹28 L/yr |
Senior Software Engineer
16k
salaries
| ₹4.5 L/yr - ₹17 L/yr |
Lead Engineer
15.8k
salaries
| ₹4.1 L/yr - ₹14 L/yr |
Analyst
14.7k
salaries
| ₹0.8 L/yr - ₹6.5 L/yr |
TCS
Wipro
Accenture
Cognizant