Advanced Java - Interview Questions and Answers


  1. What restrictions are placed on the values of each case of a switch statement?
    During compilation, the values of each case of a switch statement must evaluate to a value that can be promoted to an int value.
  2. What modifiers may be used with an interface declaration?
    An interface may be declared as public or abstract.
  3. Is a class a subclass of itself?
    A class is a subclass of itself.
  4. What is the highest-level event class of the event-delegation model?
    The java.util.EventObject class is the highest-level class in the event-delegation class hierarchy.
  5. What event results from the clicking of a button?
    The ActionEvent event is generated as the result of the clicking of a button.
  6. How can a GUI component handle its own events?
    A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

« Prev   [ Page 18 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 |