-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
44 lines (30 loc) · 844 Bytes
/
Test.java
File metadata and controls
44 lines (30 loc) · 844 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
34
35
36
37
38
39
40
41
42
43
44
package charater;
import java.nio.charset.Charset;
public class Test {
public static void main(String[] args) {
charset();
}
private void specicalChar(){
byte[] arrays = "\n".getBytes();
byte[] arrays1 = "\\n".getBytes();
String str1 = "";
for(byte by:arrays){
str1 = str1 + " " + Integer.toHexString(by);
}
System.out.println(str1);
String str2 = "";
for(byte by:arrays1){
str2 = str2 + " " + Integer.toHexString(by);
}
System.out.println(str2);
System.out.println("\n");
System.out.println("\\n");
}
private static void charset(){
Charset defualttCharset = Charset.defaultCharset();
System.out.println(defualttCharset);
}
private static void chinese() {
char character = 'ÖÐ';
}
}