Stored properties in Java
Forums:
class Point {
//In Java there are no properties
public int x, y;
}
Point point = new Point();
//x and y is 0 (before assigning)
point.x = 3;
point.y = 7;
- Log in to post comments
class Point {
//In Java there are no properties
public int x, y;
}
Point point = new Point();
//x and y is 0 (before assigning)
point.x = 3;
point.y = 7;