Restart myself - can I reinitialize everything from scratch?

后端 未结 6 1434
無奈伤痛
無奈伤痛 2021-01-27 01:27

I have something like this:

public static final String path;
static {
    path = loadProperties(\"config.conf\").getProperty(\"path\");
}

public static void mai         


        
6条回答
  •  伪装坚强ぢ
    2021-01-27 02:13

    A simpler approach is simply not to use the static initializer for this. Why not just make path non-final and load it in main?

提交回复
热议问题