public static singletonclass getObject() { if (objsingleton == null) { objsingleton = new singletonclass(); } return(objsingleton); }
public void caller() { singletonclass oneObject = singletonclass.getObject(); singletonclass2 oneObject2 = new singletonclass2(); }