<< November 24, 2009 | Home | November 26, 2009 >>

Wednesday Java Quiz: What Does It Print?

Q: Will the following Java program compile? Run without exceptions? If so, what does it print?

import javax.swing.*;

public class Main {
  public static void main(String[] args) {
    JButton button = new JButton("OK");
    System.out.println(button.isVisible());
  }
}
Tags :