Multiple choice

The import statement needed to use JOptionPane is

  1. import javax.Swing.JOptionPane ;

  2. import javax.swing.JOptionPane ;

  3. import java.swing.JOptionPane ;

  4. import javac.swing.JOptionPane ;

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Java package names are case-sensitive and follow a standard naming convention. The correct package for Swing components is javax.swing.