How many frames are displayed? import javax.swing.*; public class Test extends JFrame { public static void main(String[] args) { JFrame f1 = new Test(); JFrame f2 = new Test(); JFrame f3 = new Test(); f1.setVisible(true); f2.setVisible(true); f3.setVisible(true); } }

How many frames are displayed?
import javax.swing.*;
public class Test extends JFrame {
  public static void main(String[] args) {
    JFrame f1 = new Test();
    JFrame f2 = new Test();
    JFrame f3 = new Test();
    f1.setVisible(true);
    f2.setVisible(true);
    f3.setVisible(true);
  }


A. 1.
B. 2.
C. 3.
D. 0.

The correct answer is C


Java

Learn More Multiple Choice Question :