Skip to content

Commit a11a8c7

Browse files
添加了一些自定义的常用的学习代码
1 parent 8066654 commit a11a8c7

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

src/com/gao/jvm/CalendarTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
*/
1616
public class CalendarTest {
1717
public static void main(String[] args) throws ParseException, IOException, InterruptedException {
18+
19+
Calendar calendar1 = Calendar.getInstance();
20+
System.out.println(calendar1.getMaximum(Calendar.DAY_OF_MONTH));
21+
System.out.println(calendar1.getActualMaximum(Calendar.DAY_OF_MONTH));
22+
23+
calendar1.set(Calendar.MONTH, 10);
24+
System.out.println(calendar1.getTime());
25+
System.out.println(calendar1.getMaximum(Calendar.DAY_OF_MONTH));
26+
System.out.println(calendar1.getActualMaximum(Calendar.DAY_OF_MONTH));
27+
28+
1829
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
1930
Date date = dateFormat.parse("20130731");
2031

src/com/gao/jvm/EncytTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.gao.jvm;
2+
3+
/**
4+
* User: wangchen.gpx
5+
* Date: 13-12-26
6+
* Time: 下午7:32
7+
*/
8+
public class EncytTest {
9+
public static void main(String[] args) {
10+
String str = "Name,CardNo,Descriot,CtfTp,CtfId,Gender,Birthday,Address,Zip,Dirty,District1,District2,District3,District4,District5,District6,FirstNm,LastNm,Duty,Mobile,Tel,Fax,EMail,Nation,Taste,Education,Company,CTel,CAddress,CZip,Family,Version,id";
11+
12+
String[] strings = str.split(",");
13+
int count = 200000;
14+
for (String string : strings) {
15+
System.out.println(string + " string,");
16+
}
17+
}
18+
}

src/com/gao/jvm/IntegerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@ public static void main(String[] args) {
1515
Integer three = 128;
1616
Integer four = 128;
1717
System.out.println(three == four);
18+
19+
Integer first = new Integer(1);
20+
Integer second = new Integer(1);
21+
System.out.println(first == second);
1822
}
1923
}

0 commit comments

Comments
 (0)