Closed KorkugunuB closed 6 years ago
Hi,
no, this is not possible, but you could use a map:
If you are using >= Java 9:
Map<Integer, Object> test = Map.of(1, "hello", 2, 5);
<= Java 8
Map<Integer, Object> test = new HashMap<>();
public MyConfig() {
test.put(1, "hello");
test.put(2, 2);
}
Thanks for the reply. It's better to use it like this.
when parsing yml, can the variable be a different name ? for example java:
config: