ctrl + / 註解 (取消註解)
ctrl + shift + O 自動匯入所欠缺的類別
alt + ← 移至上一次游標所在位置
alt + → 移至下一次游標所在位置
ctrl + shift + P 移至匹配的括號
ctrl + Q 移至上一次編輯的位置
ctrl + shift + L 列出所有快速鍵
alt + shift + R 修改變數名稱
alt + / 程式碼輔助
ctrl + D 刪除單一行
ctrl + shift + F 程式碼自動排版
ctrl+ L 移至指定行數
ctrl+shift+Y 小寫字母
ctrl+shift+X 大寫字母
ctrl+alt+/ 自動完成
ctrl+3 搜尋在分頁中的檔案
ctrl+shift+U
alt+shift+J 加入Java doc說明
ctrl+* Expand All
ctrl+shift+T search
ctrl+shift+R Open Resource
ctrl+F6 上次使用的檔案
ctrl+alt+H 顯示繼承架構
ctrl+shift+G references in workspace
ctrl+F11 快速執行
F11 快速執行(Debug模式)
ctrl+K 快速搜尋選取的字
ctrl+1 自動修復
2014年11月27日 星期四
[Android]Queue(FIFO)
Reference:
Queue | Android Developments
http://developer.android.com/reference/java/util/Queue.html
http://jhengjyun.blogspot.tw/2010/09/java-queue.html
Queue | Android Developments
http://developer.android.com/reference/java/util/Queue.html
http://jhengjyun.blogspot.tw/2010/09/java-queue.html
不要使用原始的add()和remove(),在Queue中會丟出exception,
以offer()和poll()來代替
範例:
以offer()和poll()來代替
| 方法 | 傳回值 | 說明 |
| offer(E o) | boolean | 加入物件 |
| peek() | E | 取得物件,若空傳回null |
| element() | E | 取得物件,若空傳回例外 |
| poll() | E | 取得物件,並移除該物件,若空傳回null |
| remove() | E | 取得物件,並移除該物件,若空傳回例外 |
import java.util.*;
public class Ex {
public static void main(String[] args) {
Queue q = new LinkedList();
q.offer("First");
q.offer("Second");
q.offer("Third");
Object o;
System.out.println(q.toString());
while((o = q.poll()) != null) {
String s = (String)o;
System.out.println(s);
}
System.out.println(q.toString());
}
}[Android]Eclipse svn:ignore bin and gen
Reference:
Subclipse svn:ignore
http://stackoverflow.com/questions/1066809/subclipse-svnignore
Subversive: Ignore bin/ and gen/ folders
https://www.youtube.com/watch?v=UrQnsFfsaPY
Subclipse svn:ignore
http://stackoverflow.com/questions/1066809/subclipse-svnignore
Subversive: Ignore bin/ and gen/ folders
https://www.youtube.com/watch?v=UrQnsFfsaPY
2014年11月26日 星期三
訂閱:
意見 (Atom)
[iOS]退出App動畫
Objective-C: UIWindow *window = [UIApplication sharedApplication].delegate.window; [UIView animateWi...
-
Reference: Queue | Android Developments http://developer.android.com/reference/java/util/Queue.html http://jhengjyun.blogspot.tw/2010/09...
-
Disable ARC Build Settings -> Search Automatic Reference Counting -> NO Disable ARC on single files Build phases -...