我應該是全世界第2^100個知道的吧
Eclipse 按下儲存鍵的同時就會做編譯了...
為啥?
Project >Build Automatically 被打勾了
所以儲存的同時就會做編譯, class檔就出現了.
要關掉可以, 靶溝溝按掉
按 Project > Build Project 就好了
自己的小練習, 如有侵權, 被我不小心引用沒標名出處或是不想被我標示出來, 趕快跟我講, 有時候一忙會忘記看這個, 有問題或是有更好的辦法更要跟我講, 如果有什麼覺得可以更積極的, 也希望可以小力的酸我, 我玻璃心阿
總網頁瀏覽量
2017年2月22日 星期三
2017年2月2日 星期四
[JAVA] Calendar 類別
Oracle 文章寫這樣
Returns the value of the given calendar field. In lenient mode, all calendar fields are normalized. In non-lenient mode, all calendar fields are validated and this method throws an exception if any calendar fields have out-of-range values. The normalization and validation are handled by the
完全看不懂
所以自己測
import java.util.Calendar;
public class dataaaaa{
public static void main(String args[]){
Calendar ca = Calendar.getInstance();
for(int i = 0 ; i <= 10 ; i++)
System.out.println(i+": "+ca.get(i));
}
}
output :
0: 1
1: 2017
2: 1
3: 5
4: 1
5: 3
6: 34
7: 6
8: 1
9: 0
10: 11
看不懂 ? 正常
Returns the value of the given calendar field. In lenient mode, all calendar fields are normalized. In non-lenient mode, all calendar fields are validated and this method throws an exception if any calendar fields have out-of-range values. The normalization and validation are handled by the
complete()
method, which process is calendar
system dependent.完全看不懂
所以自己測
import java.util.Calendar;
public class dataaaaa{
public static void main(String args[]){
Calendar ca = Calendar.getInstance();
for(int i = 0 ; i <= 10 ; i++)
System.out.println(i+": "+ca.get(i));
}
}
output :
0: 1
1: 2017
2: 1
3: 5
4: 1
5: 3
6: 34
7: 6
8: 1
9: 0
10: 11
看不懂 ? 正常
ID Value Description
-- ----- -----------
0 1 Era (BC/AD for Gregorian).
1 2017 Year.年
2 1 Month (zero-based).月(以0開始算)
3 5 Week-of-year.(今年第幾個禮拜)
4 1 Week-of-month.(這個月第個禮拜)
5 3 Date/day-of-month.(這個月第幾天)
6 34 Day-of-year.(今年第幾天)
7 6 Day-of-week.(這禮拜第幾天)
8 1 Day-of-week-in-month.(今天是這個月的第幾個禮拜)
9 0 AM/PM selector.(上午0/下午1)
10 11 Hour.(幾點 時部分)
[1] https://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html#get(int)
[2] http://stackoverflow.com/questions/6605471/what-does-object-calendar-do
訂閱:
文章 (Atom)