-
Notifications
You must be signed in to change notification settings - Fork 0
/
Orang.java
73 lines (64 loc) · 1.5 KB
/
Orang.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/**
* @(#)Orang.java
*
*
* @author
* @version 1.00 2017/8/24
*/
public class Orang {
String nama;
String namaa;
int tinggi;
int tinggii;
int berat;
int beratt;
String warna;
String warnak;
String kelamin;
Boolean kacamata;
void menangis()
{
System.out.println("Hik....hik....hik....");
}
void tertawa()
{
System.out.println("wkwkwkwkwk");
}
}
class Objectorang
{
public static void main (String[] args) {
Orang ngan = new Orang();
ngan.nama = "Duta";
ngan.namaa = "Aldi";
ngan.tinggi = 176;
ngan.tinggii = 165;
ngan.berat = 56;
ngan.beratt = 60;
ngan.warna = "Hitam";
ngan.warnak = "Coklat";
ngan.kelamin = "pria";
ngan.kacamata = true;
System.out.println("Nama = "+ngan.nama);
System.out.println("Tinggi = "+ngan.tinggi);
System.out.println("Berat = "+ngan.berat);
System.out.println("W.Rambut = "+ngan.warna);
System.out.println("W.Kulit = "+ngan.warnak);
System.out.println("Berkacamata = "+ngan.kacamata);
System.out.println("");
System.out.println("cara tertawa =");
ngan.tertawa();
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("Nama = "+ngan.namaa);
System.out.println("Tinggi = "+ngan.tinggii);
System.out.println("Berat = "+ngan.beratt);
System.out.println("W.Rambut = "+ngan.warna);
System.out.println("W.Kulit = "+ngan.warnak);
System.out.println("Berkacamata = "+ngan.kacamata);
System.out.println("");
System.out.println("cara menangis =");
ngan.menangis();
}
}