i
HCLTech
Filter interviews by
Hashmap and Hashtable are both used to store key-value pairs, but Hashtable is synchronized and slower than Hashmap.
Hashmap is not synchronized and allows null keys/values.
Hashtable is synchronized and does not allow null keys/values.
Hashmap is faster than Hashtable.
Hashmap is preferred for non-threaded applications.
Hashtable is preferred for threaded applications.
Example: HashMap
A defect is an error or flaw in a software application that causes it to behave unexpectedly or not as intended.
Defects can be caused by coding errors, design flaws, or environmental factors.
Defects can lead to system crashes, data corruption, or security vulnerabilities.
Examples of defects include syntax errors, logic errors, and performance issues.
Defects can be identified through testing, debugging, and code re...
To run a Java program using command line, use the 'java' command followed by the name of the class containing the main method.
Navigate to the directory containing the .class file
Type 'java' followed by the name of the class containing the main method
Include any necessary command line arguments after the class name
Press enter to run the program
Example: java MyProgram arg1 arg2
Hashmap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
Hashmap uses an array to store the key-value pairs
The key is hashed to find the index in the array where the value is stored
If two keys hash to the same index, a linked list is used to store multiple values
Hashmap uses load factor to determine when to resize the array
Hashmap provides constant time complexity for ins...
What people are saying about HCLTech
In exception handling, parent catch blocks should be placed after child catch blocks to ensure proper error handling.
Catch blocks are evaluated in the order they are written; the first matching block executes.
If a child catch block is placed before a parent, the parent block will never execute for that exception type.
Example: If 'catch (Exception e)' is before 'catch (SpecificException e)', the specific exception ...
Classloader is a part of JVM that loads classes into memory. It has three types: Bootstrap, Extension, and Application.
Classloader loads classes into memory when they are needed by the program
Bootstrap classloader loads core Java classes from the JDK's rt.jar file
Extension classloader loads classes from the JDK's lib/ext directory
Application classloader loads classes from the classpath of the application
Classloade...
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Ensures a class has only one instance
Provides a global point of access to that instance
Commonly used in scenarios where only one instance of a class is needed, such as database connections or configuration settings
Singleton design pattern ensures a class has only one instance and provides a global point of access to it.
Ensures a class has only one instance
Provides a global point of access to that instance
Commonly used in scenarios where only one instance of a class is needed, such as database connections or configuration settings
I applied via Company Website and was interviewed before Nov 2022. There were 4 interview rounds.
I applied via Naukri.com and was interviewed in Sep 2021. There were 4 interview rounds.
I applied via LinkedIn and was interviewed in Mar 2021. There were 3 interview rounds.
To run a Java program using command line, use the 'java' command followed by the name of the class containing the main method.
Navigate to the directory containing the .class file
Type 'java' followed by the name of the class containing the main method
Include any necessary command line arguments after the class name
Press enter to run the program
Example: java MyProgram arg1 arg2
A defect is an error or flaw in a software application that causes it to behave unexpectedly or not as intended.
Defects can be caused by coding errors, design flaws, or environmental factors.
Defects can lead to system crashes, data corruption, or security vulnerabilities.
Examples of defects include syntax errors, logic errors, and performance issues.
Defects can be identified through testing, debugging, and code reviews...
Hashmap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
Hashmap uses an array to store the key-value pairs
The key is hashed to find the index in the array where the value is stored
If two keys hash to the same index, a linked list is used to store multiple values
Hashmap uses load factor to determine when to resize the array
Hashmap provides constant time complexity for insertio...
Classloader is a part of JVM that loads classes into memory. It has three types: Bootstrap, Extension, and Application.
Classloader loads classes into memory when they are needed by the program
Bootstrap classloader loads core Java classes from the JDK's rt.jar file
Extension classloader loads classes from the JDK's lib/ext directory
Application classloader loads classes from the classpath of the application
Classloader fol...
Hashmap and Hashtable are both used to store key-value pairs, but Hashtable is synchronized and slower than Hashmap.
Hashmap is not synchronized and allows null keys/values.
Hashtable is synchronized and does not allow null keys/values.
Hashmap is faster than Hashtable.
Hashmap is preferred for non-threaded applications.
Hashtable is preferred for threaded applications.
Example: HashMap
In exception handling, parent catch blocks should be placed after child catch blocks to ensure proper error handling.
Catch blocks are evaluated in the order they are written; the first matching block executes.
If a child catch block is placed before a parent, the parent block will never execute for that exception type.
Example: If 'catch (Exception e)' is before 'catch (SpecificException e)', the specific exception will ...
I applied via Approached by Company and was interviewed in Oct 2021. There were 4 interview rounds.
Programming questions
I applied via Campus Placement and was interviewed before May 2021. There were 4 interview rounds.
VERBAL QUANT DI/LR and Picture based test
Fibonacci series can be easily implemented using loops in C++ or C.
Declare variables for first two numbers of the series
Use a loop to calculate and print the next number in the series
Repeat the loop until desired number of terms are printed
based on 3 interview experiences
Difficulty level
Duration
based on 128 reviews
Rating in categories
Software Engineer
24.9k
salaries
| ₹2.7 L/yr - ₹8.1 L/yr |
Technical Lead
22.9k
salaries
| ₹10.9 L/yr - ₹21 L/yr |
Senior Software Engineer
16.8k
salaries
| ₹5.4 L/yr - ₹15.8 L/yr |
Lead Engineer
16.4k
salaries
| ₹5.3 L/yr - ₹12.4 L/yr |
Analyst
15.9k
salaries
| ₹2.3 L/yr - ₹6.5 L/yr |
TCS
Wipro
Accenture
Cognizant