-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApps.java
More file actions
14 lines (11 loc) · 427 Bytes
/
Apps.java
File metadata and controls
14 lines (11 loc) · 427 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package singleton;
public class Apps {
public static void main(String[] args) {
SettingsV1 settings1 = SettingsV1.getInstance();
SettingsV1 settings2 = SettingsV1.getInstance();
System.out.println(settings1 == settings2);
SettingsV2 instance1 = SettingsV2.getInstance();
SettingsV2 instance2 = SettingsV2.getInstance();
System.out.println(instance1 == instance2);
}
}