Sync Factory Method, Abstract Factory, Builder, Prototype to Java 25; fix post/code mismatches

This commit is contained in:
2026-06-23 11:00:02 +05:30
parent 2f684bf3d7
commit 2fbf89875b
51 changed files with 634 additions and 337 deletions

View File

@@ -0,0 +1,19 @@
package singleton;
public class AppConfig {
private AppConfig() {
System.out.println("Reading configuration from file...");
}
private static class Holder {
static final AppConfig INSTANCE = new AppConfig();
}
public static AppConfig getInstance() {
return Holder.INSTANCE;
}
public String getProperty(String key) {
return System.getProperty(key, "(not set)");
}
}