Tổng hợp đầy đủ phím tắt cơ bản, cấu trúc lệnh tắt thông dụng, chính xác trong Netbeans IDE giúp bạn lập trình, code nhanh chóng. Xem ngay!
NetBeans
Bài viết được thực hiện trên máy tính Acer Aspire 5, hệ điều hành Windows 10. Bạn có thể thực hiện tương tự các thao tác trên các máy tính chạy hệ điều hành Windows, macOS và Linux khác.
Lưu ý Trên Windows bạn dùng phím Ctrl, trên Mac sẽ là phím Cmd.
| Tên phím | Chức năng |
| Ctrl + E/X | xóa dòng tại con trỏ chuột |
| Ctrl + Shift + Up/Down | tạo bản sao 1 dòng |
| Ctrl + R | đổi tên nhiều biến cùng 1 lúc |
| Ctrl + Shift + O | tìm 1 file bất kỳ trong Project đang mở |
| Ctrl + Q | trở về vị trí edit cuối cùng |
| Ctrl + Shitf + 1 | Định vị 1 file trong project |
| Tab + Ctrl + 7 | Mở nhanh Navigator |
| Ctrl + / | Bật tắt comment |
| Ctrl + B | Di chuyển đến chỗ khai báo function |
| Alt + Insert | sinh ra code |
| Ctrl + Shift + I | tự động thêm class cần thiết |
| Alt + Shift + F | định dạng code |
| Tên phím | Chức năng |
| F9 | biên dịch package/file |
| F11 | build project chính |
| Alt + Shift + F | định dạng code |
| Shift + F11 | xóa và build project chính |
| Shift + F6 | chạy file hiện tại |
| F6 | chạy project |
| Ctrl + F5 | bắt đầu debugging project chính |
| Ctrl + Shift + F5 | bắt đầu debugging file hiện tại |
| Ctrl + Shift + F6 | bắt đầu debugging file |
| Ctrl + Shift + F8 | đặt breakpoint mới |
Ấn thêm phím Tab và có phân biệt chữ hoa vd: En + Tab =Enumeration
| Tên phím | Cấu trúc lệnh |
| En | Enumeration |
| Ex | Exception |
| Ob | Object |
| Psf | public static final |
| Psfb | public static final boolean |
| Psfi | public static final int |
| Psfs | public static final String |
| St | String |
| ab | abstract |
| as | assert true; |
| bo | boolean |
| bcom | /**/ |
| br | break; |
| ca | catch ( |
| cl | class |
| cn | continue |
| db | double |
| df | default: |
| dowhile | do { } while (condition); |
| eq | equals |
| ex | extends |
| fa | false |
| fcom | // <editor-fold></editor-fold> |
| fi | final |
| fl | float |
| forc | for (Iterator it = collection.iterator();it.hasNext();) {Object elem = (Object) it.next();} |
| fore | for (Object elem : iterable) {} |
| fori | for (int i = 0; i < arr.length; i++) {} |
| forl | for (int i = 0; i < lst.size(); i++) { |
| Object | object = lst.get(i); } |
| forst | for (StringTokenizer st = new |
| String | Tokenizer(“”); st.hasMoreTokens();) } |
| forv | for (int i = 0; i < vct.size(); i++) { |
| fy | finally{ |} |
| ie | interface |
| ifelse | if (condition){}else { } |
| iff | if (exp) {} |
| im | implements |
| inst | if (exp instanceof Object) { |
| Object | obj = (Object) exp; |
| iof | instanceof |
| ir | import |
| le | length |
| na | native |
| newo | Object name = new Object(args); |
| pe | protected |
| pr | private |
| psf | private static final |
| psfb | private static final boolean |
| psfi | private static final int |
| psfs | private static final String |
| pst | printStackTrace(); |
| psvm | public static void main(String[] args){} |
| pu | public |
| re | return |
| runn | Runnable runnable = new Runnable() { |
| public | void run() {}}; |
| serr | System.err.println (“|”); |
| sh | short |
| sout | System.out.println (“|”); |
| soutv | System.out.println(“Object = ” + Object); |
| st | static |
| su | super |
| sw | switch (var) { case val: break; |
| default: | throw new AssertionError();} |
| sy | synchronized |
| tds | Thread.dumpStack(); |
| th | throws |
| tr | transient |
| trycatch | try {} |
| catch | (Exception e) {} |
| tw | throw |
| vo | volatile |
| wh | while ( |
| whileit | while (it.hasNext()) { |
| Object | elem = (Object) it.next();} |
| whilen | while (en.hasMoreElements()) { |
| Object | elem = (Object) en.nextElement();} |
| whilexp | while (exp) {} |
| ag | application.getAttribute(“|”) |
| ap | application.putAttribute(“|”,) |
| ar | application.removeAttribute(“|”) |
| cfgi | config.getInitParameter(“|”) |
| jspf | <jsp:forward page=”|”/> |
| jspg | <jsp:getProperty name=”|” property=”” /> |
| jspi | <jsp:include page=”|”/> |
| jspp | <jsp:plugin type=”|” code=”” codebase=””></jsp:plugin> |
| jsps | <jsp:setProperty name=”|” property=””/> |
| jspu | <jsp:useBean id=”I” type=””/> |
| oup | out.print(“|”) |
| oupl | out.println(“|”) |
| pcg | pageContext.getAttribute(“|”) |
| pcgn | pageContext.getAttributeNamesInScope(“|”) |
| pcgs | pageContext.getAttributesScope(“|”) |
| pcr | pageContext.removeAttribute(“|”) |
| pg | <%@page |%> |
| pga | <%@page autoFlush=”false”%> |
| <%@page buffer=”|kb”%> | |
| pgc | <%@page contentType=”|”%> |
| pgerr | <%@page errorPage=”|”%> |
| pgex | <%@page extends=”|”%> |
| pgie | <%@page isErrorPage=”true”%> |
| pgim | <%@page import=”|”%> |
| pgin | <%@page info=”|”%> |
| pgit | <%@page isThreadSafe=”false”%> |
| pgl | <%@page language=”java”%> |
| pgs | <%@page session=”false”%> |
| rg | request.getParameter(“|”) |
| sg | session.getAttribute(“|”) |
| sp | session.setAttribute(“|”, ) |
| sr | session.removeAttribute(“|”) |
| tglb | <%@taglib uri=”|”%> |
Tổng hợp các phím tắt cơ bản, cấu trúc lệnh tắt trong Netbeans IDE giúp bạn lập trình, code nhanh chóng. Hãy chia sẻ bài viết đến bạn bè nếu thấy hay và đừng quên để lại bình luận bên dưới khi có thắc mắc nhé!
Nguồn tham khảo: netbeans.apache.org/help
Trung tâm chuyên sửa chữa thay thế, bảo hành miễn phí, nhượng quyền thương hiệu trungtambaohanh.com + marketing.