| Counter.java |
1 /* 2 * Counter.java 3 * 4 * Created on 18. Jänner 2009, 00:41 5 * 6 * Class for Counter creation 7 * 8 * @author Alexander Scheidl 9 */ 10 11 package testrsa; 12 13 14 public class Counter { 15 16 17 private int i = 0; 18 19 /** Creates a new instance of Counter */ 20 public Counter() { 21 } 22 23 24 /* increase Counter by 1 */ 25 public void erhoehe(){ 26 this.i= i+1; 27 } 28 29 30 /* @return i returns current status of the Counter */ 31 public int stand(){ 32 return this.i; 33 } 34 35 } 36