Why ArrayList class is not a synchronized class and why it
is not a thread safe class? explain
Answer / atre sachin
If multiple threads access an ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it must be synchronized externally. (A structural modification is any operation that adds or deletes one or more elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural modification.)
Is This Answer Correct ? | 2 Yes | 0 No |
I want to store more than 10 objects in a remote server? Which methodology will follow?
What is ternary operator? Give an example.
What is toarray method in java?
What are the two environment variables that must be set in order to run any java programs?
Should a main method be compulsorily declared in all java classes?
Where are global variables stored?
What is Applet Flickering ?
1 Answers Infosys, Persistent,
What is the difference between error and an exception?
Given a singly linked list, determine whether it contains a loop or not without using temporary space?
How many types of thread in java? give the name
What is the purpose of garbage collection in java, and when is it used?
Explain how can you debug the Java code?