-3

netbeans like typing shortcut code in eclipse e.g. psvm press tab get public static void main sout is for System.out.println();

https://netbeans.org/project_downloads/www/shortcuts.pdf please refer page 2.

This kind of shortcuts I am looking for.

3 Answers3

0

type sysout and then press ctrl +space

Prasad Kharkar
  • 12,721
  • 3
  • 35
  • 55
0

These kind of shortcuts are called Code Templates in eclipse (and also in Netbeans by the looks of the pdf that you refer in your question). Here are the common ones

"sysout" + ctrl + space --> System.out.println()
"syserr" + ctrl + space --> System.err.println()
"systrace" + ctrl + space ---> System.out.println("OwnerClass.CurrentMethod()") ... bascially prints the current method to standard out.

If you forget them at any time just type sys and hit ctrl+space, and you will get these in the auto-complete menu like this: enter image description here

Also checkout this awesome SO question addressing this question for other common code templates (other than System.out.println()): Useful Eclipse Java Code Templates

Create your own shortcuts: How to add shortcut keys for java code in eclipse; Effective Eclipse: Don't write the code, generate it

Other eclipse shortcuts

Community
  • 1
  • 1
vijay
  • 2,536
  • 2
  • 19
  • 37
  • https://netbeans.org/project_downloads/www/shortcuts.pdf please refer page 2. This kind of shorcuts I am looking for. – user2009611 Jul 01 '13 at 05:22
  • page two's heading is "Highlights of NetBeans IDE 7.0 Keyboard Shortcuts & Code Templates" ... which, I think, is exactly what i am talking about in my answer. I detail how to use standard code templates and resources on how to create your own. The last link in my answer provides 93 general purpose keyboard shortcuts (not code templates). If there is something you are looking for specifically, kindly say so. – vijay Jul 01 '13 at 07:25
0

As others mentioned short cut for System.out.println() is to type sysout and press ctrl+space bar.

But there are other helpful shortcuts in eclipse which you can use. You cna check them by going to eclipse-> Click help -> Key Assist.

Juned Ahsan
  • 63,914
  • 9
  • 87
  • 123