Fujitsu
Vishakha Plastic Pipes Interview Questions and Answers
Q1. What is the load factor for HASH MAP?
Load factor for HASH MAP is the ratio of number of elements to the size of the table.
Load factor determines the efficiency of the HASH MAP.
It is calculated as the number of elements divided by the size of the table.
A higher load factor means more collisions and slower performance.
A good load factor is around 0.75.
Load factor can be adjusted by increasing or decreasing the size of the table.
Q2. What is .net,what is oops explain briefly
The .NET framework is a software development platform developed by Microsoft. OOPs stands for Object-Oriented Programming, a programming paradigm based on the concept of objects.
The .NET framework is used for building various types of applications, including web, desktop, and mobile applications.
OOPs is a programming paradigm that uses objects and classes to design and develop applications.
In OOPs, objects are instances of classes that encapsulate data and behavior.
Some key p...read more
Q3. How to handle the ConcureentModificationException
ConcurrentModificationException occurs when a collection is modified while iterating over it.
Use Iterator to iterate over the collection instead of foreach loop.
If modification is necessary, use Iterator's remove() method instead of collection's remove() method.
Consider using synchronized collections or ConcurrentHashMap to avoid ConcurrentModificationException.
Q4. How to handle exception in java
In Java, exceptions can be handled using try-catch blocks to catch and handle specific exceptions.
Use try-catch blocks to catch exceptions and handle them gracefully
Use multiple catch blocks to handle different types of exceptions
Use finally block to execute code regardless of whether an exception is thrown or not
Throw custom exceptions using throw keyword
Q5. In Java8, different between flatmap and map
map transforms each element in a stream, while flatMap transforms each element into multiple elements
map applies a function to each element in a stream and returns a new stream of the results
flatMap applies a function that returns a stream for each element in the original stream, then flattens the streams into a single stream
Example: map - stream.map(x -> x * x), flatMap - stream.flatMap(str -> Arrays.stream(str.split("")))
Q6. What is Dependency Injection?
Dependency Injection is a design pattern in which components are given their dependencies rather than creating them internally.
Allows for easier testing by providing mock dependencies
Promotes loose coupling between components
Improves code reusability and maintainability
Examples: Constructor injection, Setter injection, Interface injection
Q7. Difference between heap and stack?
Heap and stack are two types of memory allocation in computer systems.
Stack is used for static memory allocation while heap is used for dynamic memory allocation.
Stack memory is allocated in a contiguous block while heap memory is not.
Stack memory is managed by the CPU while heap memory is managed by the programmer.
Stack memory is faster to access than heap memory.
Examples of stack memory include function calls and local variables while examples of heap memory include objects...read more
Interview Process at Vishakha Plastic Pipes
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month