Advertisement
cybergraph

MembuatEncapsulationJava

Oct 24th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package pertemuan;
  7.  
  8. /**
  9. *
  10. * @author LK09NU17UTY
  11. */
  12. public class Pertemuan {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18.  
  19. Manusia man1 = new Manusia();
  20. man1.setNama("Agus");
  21.  
  22.  
  23. System.out.println("nama Man1 :"+man1.getNama());
  24. System.out.println("man1 "+man1.alamat);
  25. man1.setNama("Agus");
  26.  
  27. man1.ubahData("Yana", "Jonggol");
  28. System.out.println("nama Man1 :"+man1.getNama());
  29. System.out.println("man1 "+man1.alamat);
  30. }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement