previous | start | next

Constructors (continued)

Does this class have a constructor?

    1   public class IntPair
    2   {
    3     private int x;
    4     private int y;
    5   
    6     public setX(int x) { this.x = x;}
    7
    8     public setY(int y) { this.y = y;}
    9   
   10     public int x() {
   11       return x;
   12     }
   13    
   14     public int y() {
   15       return y;
   16     }
   17   }


previous | start | next