Set - 6

Question 11 :

What is the difference between a while statement and a do statement?

Answer :

A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

Question 12 :

How are the elements of a GridBagLayout organized?

Answer :

The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.

Question 13 :

What advantage do Java's layout managers provide over traditional windowing systems?

Answer :

Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.

Question 14 :

What is the Collection interface?

Answer :

The Collection interface provides support for the implementation of a mathematical bag - an unordered collection of objects that may contain duplicates.

Question 15 :

What modifiers can be used with a local inner class?

Answer :

A local inner class may be final or abstract.