Interview Questions - Advanced Java

21.
Which method of the Component class is used to set the position and size of a component?
setBounds() method is used to set the position and size of a component.

22.
What is the difference between yielding and sleeping?
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.

23.
Which java.util classes and interfaces support event handling?
The EventObject class and the EventListener interface support event processing.

24.
Is sizeof a keyword?
The sizeof operator is not a keyword.