Netbeans 快捷缩写

2010-08-07 14:27  3327人阅读  评论 (0)
Tags: netbeans

使用NetBeans IDE提供的代码快速完成功能,可以大大节省我们编写代码的时间。比如想要输System.out.println(" ");这条语句,我们只需要输入sout 然后按一次Tab键,IDE就会自动帮我们完成System.out.println(" ");语句。除了sout还有很多,下面列举了一些常用的缩写模板,另外还可以定义自己的代码缩写模板。

缩写      代码模板   
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   
bo        boolean   
br        break   
ca        catch (   
cl        class   
cn        continue   
df        default:   
dowhile    
do {   

} while (condition);   
eq        equals   
ex        extends   
fa        false   
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 < SCRAMBLED_WORD_LIST.length; i++) {

}   
fy       finally   
ie       interface   
ifelse    
if (condition) {

} else {

}   
im       implements   
iof      instanceof   
ir       import   
le       length   
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   
serr    System.err.println("|");   
sout    System.out.println("|");   
st      static   
sw      switch (   
sy      synchronized   
tds     Thread.dumpStack();   
th      throws   
trycatch   
try {

} catch(Exception e) {

}   
tw       throw   
twn      throw new   
wh       While (   
whilei   
    while (it.hasNext()) {   
        Object elem = (Object) it.next();   

    }
豫ICP备09035262号-1