Advertisement
BlackBoY_

biodata pribadi

May 25th, 2021
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class BiodataPribadiMahasiswa{
  2.     String nama;
  3.     int nim;
  4.     double tb;
  5.     float bb;
  6.     boolean jk;
  7.    
  8.     BiodataPribadiMahasiswa(String nama1, int nim1, double tb1, float bb1, boolean jk1){
  9.         nama = nama1;
  10.         nim = nim1;
  11.         tb = tb1;
  12.         bb = bb1;
  13.         jk = jk1;
  14.        
  15.         System.out.println("Biodata Pribadi Mahasiswa");
  16.         System.out.println("Nama            : " + nama);
  17.         System.out.println("NIM             : " + nim);
  18.         System.out.println("Tinggi Badan    : " + tb);
  19.         System.out.println("Berat Badan     : " + bb);
  20.         System.out.println("Anda Laki-Laki ?  " + jk);
  21.     }
  22.     public static void main(String[] args) {
  23.         BiodataPribadiMahasiswa mahasiswa1 = new BiodataPribadiMahasiswa("BlackBoY", 19103079, 180.5, 65.5f, true);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement