Inteview question on Threading
1.How to make List immutable in java?
The Collection has method unmodifiableList will returns the list Immutable.
The returned unmodifiableList wont support add , remove , alteration operation ,
If add, remove, alteration is done then UnsupportedOperationException Exception is thown.
List list1 = Collections.unmodifiableList(list);
What is the difference between wait state & sleep state?
What is the use of the thread yield method ?
what is future objects in Java ?
- What is Daemon Thread differs from Normal Thread?
- True: on main thread exists then the child thread also forced to halt
- False: Child Thread will still execute even main thread exited
- The default Property of setDaemon is false
Groups:
