Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SingletonTest{
- public static void main(String[] args){
- Earth e1 = Earth.getInstance();
- Earth e2 = Earth.getInstance();
- System.out.println(e1==e2);
- //Above statement should always return true for singleton.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement