cybergraph

MembuatMethodJavaGetdanSet_Manusia

Oct 24th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 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 Manusia {
  13. String nama;
  14. String alamat;
  15.  
  16.  
  17. void ubahData(String nm,String almt){
  18.  
  19. nama=nm;
  20. alamat=almt;
  21.  
  22. }
  23.  
  24. void hapusNama(){
  25.  
  26. nama="";
  27. }
  28. void setNama(String nm){
  29. nama=nm;
  30. }
  31.  
  32. String getNama(){
  33.  
  34. return nama;
  35. }
  36.  
  37.  
  38.  
  39. }
Add Comment
Please, Sign In to add comment