Advanced Java - Interview Questions and Answers


  1. What is an Iterator interface?
    The Iterator interface is used to step through the elements of a Collection.
  2. What is the difference between the >> and >>> operators?
    The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.
  3. 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.
  4. 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.
  5. Which java.util classes and interfaces support event handling?
    The EventObject class and the EventListener interface support event processing.
  6. Is sizeof a keyword?
    The sizeof operator is not a keyword.

« Prev   [ Page 4 of 31  Jump... Next »

Jump to page : 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |