Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which package contains the class for TabFolder in SWT?

  1. org.eclipse.swt

  2. org.eclipse.swt.widgets

  3. org.eclipse.swt.custom

  4. org.eclipse.swt.layout

The correct answer is: org.eclipse.swt

The org.eclipse.swt package contains the class for TabFolder in SWT. This is because the class is part of the SWT library and is used to create a tabbed display of widgets. Options B, C, and D are incorrect because they correspond to different packages within the SWT library that do not include the TabFolder class. Option B is the general widgets package, whereas option C is the custom widgets package and option D is the layout package. These packages may contain other useful classes, but not specifically the TabFolder class. Therefore, option A is the correct answer as it directly corresponds to the correct package.