0

I am following a book called "Big Java late objects" and right now I am studying GUI. The thing that I cannot understand why is in the following piece of code. Some of the field variables are declared "static" why?:

public class InvestmentFrame2 extends JFrame{

   private static final int FRAME_WIDTH = 450;
   private static final int FRAME_HEIGHT = 100;

   private static final double DEFAULT_RATE = 5;
   private static final double INITIAL_BALANCE = 1000;

   private JLabel rareLabel;
   private JTextField rateField;
   private JButton button;
   private JLabel resultLabel;
   private double balance;

}

Georgi Koemdzhiev
  • 11,421
  • 18
  • 62
  • 126

0 Answers0