Simple Class - One Method
Previous    Next    Home    Source    Package

  1. Class A is defined with a single constructor of one int argument and one method called rand.
  2. A new A is created every time "Press Me" is clicked via
    A a = new A(Integer.parseInt((String)seed.getSelectedItem()));
    The old one is thrown away.