Java Programming and Technical Programming Definition

Q. What is the difference between yielding and sleeping?

A. When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.

Read Solution (Total 0)

Java Other Question

Q. What is the purpose of finalization?

A. The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. For example, closing a opened file, closing a opened database Connection.
Q. What is mutable object and immutable object?

A. If a object value is changeable then we can call it as Mutable object. (Ex., String Buffer, If you are not allowed to change the value of an object, it is immutable object. (Ex., String, Integer, Float, -)