Structures type members in Java
Forums:
//In Java there are no structures
class Setting {
//type field
static public String Path;
//In Java there are no properties
static public int Mode;
//type method
static public void SetNextMode() {
Mode = (Mode + 1) % 3;
}
}
Setting.Mode = 3;
Setting.SetNextMode();
//Setting.Mode is 1
- Log in to post comments