Compound data type: Difference between revisions
Content added Content deleted
(Object and JSON) |
|||
Line 98: | Line 98: | ||
[[Category:Java]] |
[[Category:Java]] |
||
// The byte structure format does not exist natively --> TODO. |
|||
class Point |
public class Point |
||
{ |
{ |
||
public int x, y; |
public int x, y; |
||
Line 104: | Line 105: | ||
public Point(int x0) { this(x0,0); } |
public Point(int x0) { this(x0,0); } |
||
public Point(int x0, int y0) { x = x0; y = y0; } |
public Point(int x0, int y0) { x = x0; y = y0; } |
||
public static void main(String args[]) |
|||
{ |
|||
Point point = new Point(1,2); |
|||
System.out.println("x = " + point.x ); |
|||
System.out.println("y = " + point.y ); |
|||
} |
|||
} |
} |
||