CounterDemo.java.html

  1  public class CounterDemo
  2  {
  3     public static void main(String[] args)
  4     {
  5        Counter tally = new Counter();
  6        tally.click();
  7        tally.click();
  8        int result = tally.getValue(); // Sets result to 2
  9        System.out.print("result: ");
 10        System.out.println(result);
 11     }
 12  }