Structures (records)

record 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

System.out.println(Setting.Mode);