SHARE
TWEET

Untitled

agoyaja Feb 17th, 2020 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Main{
  2.    
  3.     data orang;
  4.    
  5.     public Main(){
  6.         data awal  = this.orang;
  7.     }
  8.     public static void main(String[] args){
  9.        
  10.         data info = new data();
  11.        
  12.         info.setNama("YOGA");
  13.         info.setAlamat("JATEK NGASRI");
  14.         info.setDesa("Mulyoagung");
  15.         info.setKecamatan("Dau");
  16.         info.setKabupaten("Malang");
  17.        
  18.         System.out.println("Nama        :" +info.getNama());
  19.         System.out.println("Alamat      :" +info.getAlamat());
  20.         System.out.println("Desa        :" +info.getDesa());
  21.         System.out.println("Kecamatan   :" +info.getKecamatan());
  22.         System.out.println("Kabupaten   :" +info.getKabupaten());
  23.     }
  24. }
  25.  
  26.  class data {
  27.     private String Nama;
  28.     private String Alamat;
  29.     private String Desa;
  30.     private String Kecamatan;
  31.     private String kabupaten;
  32.  
  33.     public String getNama() {
  34.         return Nama;
  35.     }
  36.  
  37.     public void setNama(String Nama) {
  38.         this.Nama = Nama;
  39.     }
  40.  
  41.     public String getAlamat() {
  42.         return Alamat;
  43.     }
  44.  
  45.     public void setAlamat(String Alamat) {
  46.         this.Alamat = Alamat;
  47.     }
  48.  
  49.     public String getDesa() {
  50.         return Desa;
  51.     }
  52.  
  53.     public void setDesa(String Desa) {
  54.         this.Desa = Desa;
  55.     }
  56.  
  57.     public String getKecamatan() {
  58.         return Kecamatan;
  59.     }
  60.  
  61.     public void setKecamatan(String Kecamatan) {
  62.         this.Kecamatan = Kecamatan;
  63.     }
  64.  
  65.     public String getKabupaten() {
  66.         return kabupaten;
  67.     }
  68.  
  69.     public void setKabupaten(String kabupaten) {
  70.         this.kabupaten = kabupaten;
  71.     }
  72. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top