-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram.java
More file actions
36 lines (27 loc) · 855 Bytes
/
Copy pathprogram.java
File metadata and controls
36 lines (27 loc) · 855 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
package Hello;
/**
* Created by yourfinger on 16/1/13.
*/
public class program {
public static void main(String[] arg){
float val = 0.22f;
System.out.println("val = " + val);
int val1 = 4 >>> 1;
System.out.println("val1 = " + val1);
String str1 = "yourfinger";
String str2 = new String("yourfinger");
System.out.println(str1 == str2);
System.out.println(str1.equals(str2));
StringBuffer strBuffer = new StringBuffer();
strBuffer
.append("I ")
.append("am ")
.append("yourfinger!");
System.out.println(strBuffer.toString());
String[] strArray = { "I ", "am ", "yourfinger!!"};
for (String str : strArray){
System.out.print(str);
}
System.out.println();
}
}