Structures constants in Java
Forums:
//In Java there are no structures
class BoldLine {
public final int lineWidth = 10;
}
BoldLine line = new BoldLine();
int width = line.lineWidth;
//width is 10
- Log in to post comments
//In Java there are no structures
class BoldLine {
public final int lineWidth = 10;
}
BoldLine line = new BoldLine();
int width = line.lineWidth;
//width is 10