Advanced Java - Interview Questions and Answers


  1. What is the difference between a Scrollbar and a ScrollPane?

    A Scrollbar is a Component, but not a Container. A ScrollPane is a Container.

    A ScrollPane handles its own events and performs its own scrolling.

  2. What is the difference between a public and a non-public class?

    A public class may be accessed outside of its package.

    A non-public class may not be accessed outside of its package.

  3. To what value is a variable of the boolean type automatically initialized?
    The default value of the boolean type is false.
  4. Can try statements be nested?
    Try statements may be tested.
  5. What is the difference between the prefix and postfix forms of the ++ operator?

    The prefix form performs the increment operation and returns the value of the increment operation.

    The postfix form returns the current value all of the expression and then performs the increment operation on that value.

  6. What is the purpose of a statement block?
    A statement block is used to organize a sequence of statements as a single statement group.

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