Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathBackSlash.java
More file actions
Latest commit
33 lines (31 loc) · 914 Bytes
/
Copy pathBackSlash.java
File metadata and controls
33 lines (31 loc) · 914 Bytes
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
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
packageuhuyy;
/**
*
* @author Uhuyy
* yang dapat saya jelaskan dari program sederhana tersebut adalah
* java merupakan bahasa pemprograman case sensitive, jadi harus teliti huruf besar kecil saat melakukan penulisan
*/
publicclasspercobaankedua {
publicstaticvoidmain(Stringargs[])
{
charbs = '\b';
charlf = '\n';
chartb = '\t';
System.out.print("Nama Buah : ");
// fungsi \b adalah menghapus 1 huruf dalam string
System.out.print("1. Manggis");
System.out.print(bs);
//fungsi \n yaitu untuk enter atau ganti baris
System.out.print(lf);
System.out.print("2. Semangka");
System.out.print("3. Durian");
//fungsi \t adalah untuk memberi jarak pada string
System.out.print(tb);
System.out.print("3. Salak");
}
}