单选题
选择正确的语句填入下列程序的横线处。
import
java.awt.*;
import java.awt.event.*;
public class ex21
{
static Frame f;
static
FileDialog fd;
public static void
main(String[] args)
{
f = new
Frame("ex21");
______
fd. setVisible
(true);
System.out.println (fd.getFile ());
}
}
- A. new FileDialog(f, "FileDialog");
- B. new FileDialog("FileDialog");
- C. fd = new FileDialog(f, "FileDialog");
- D. fd = new FileDialog("FileDialog");