In the following code that uses a Swing GUI, which line has an error?


1 public class TestApplet extends Applet
2 {
3 public void init()
4 {
5 JLabel label = new JLabel("Test label");
6 setLayout(new FlowLayout());
7 add(label);
8 }
9 }


A) 1
B) 3
C) 5
D) There are no errors.


A) 1

Computer Science & Information Technology

You might also like to view...

A standard convention for navigating to a previous Web page is to use the word ____.

A. previous B. prior C. back D. return

Computer Science & Information Technology

Preliminary report pages are numbered with Arabic numbers (1, 2, 3).

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When discussing laser printers, what does the term photoconductive mean?

What will be an ideal response?

Computer Science & Information Technology

As a general rule, an eof question should always come immediately after an input statement because the end-of-file condition will be detected at input.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology