Varasku

main do Singletona

Nov 14th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. package javaapplicationuml;
  2.  
  3.  
  4. public class MainClass {
  5.  
  6.  
  7. public static void main(String[] args) {
  8. OsobaSingleton osoba1=OsobaSingleton.getInstance();
  9. osoba1.getImie();
  10. OsobaSingleton osoba2=OsobaSingleton.getInstance();
  11. osoba2.getImie();
  12. OsobaSingleton osoba3=OsobaSingleton.getInstance();
  13. osoba3.getImie();
  14.  
  15.  
  16.  
  17.  
  18. }
  19.  
  20. }
Add Comment
Please, Sign In to add comment