1 public class CallTests { 2 3 public static void main (String [] args) { 4 Position p = new Position(3,4); 5 System.out.println("Line: "+p.line()+" Col: "+p.col()); 6 } 7 } 8 9 class Position { 10 11 int line; 12 int col; 13 public Position(int line, int col) { 14 this.line = line; 15 this.col = col; 16 } 17 public int line(){ 18 return line; 19 } 20 public int col(){ 21 return col; 22 } 23 } 24 25 | Popular Tags |