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

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

Mastering Java: The Ultimate Quiz for 'Thinking in Java'. Dive deep into Java with multiple-choice questions. Challenge yourself with quiz questions designed to test and improve your understanding of the 'Thinking in Java' book. Get ready for your exam!

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.