Eclipse keyboard shortcut to pass a parameter to a method

Today I watched the video, and I saw the teacher doing the correction in his code in Eclipse without touching the mouse. Below is the code.

  System.out.println(Character.toUpperCase(ch)'c'); 

He changed the code to:

  System.out.println(Character.toUpperCase('c')); 

I always wanted to do this because it hurts to do this with backspaces and re-type ')' at the end. Does anyone know how to do this. Thanks

+7
java eclipse
source share
1 answer

Ctrl + . in the editor will take you to the first problem (error / warning). In your case, ch will be highlighted, then press delete twice to remove ch and). Then press Ctrl + Shift + P to place the place you want to insert the bracket, and then press ) . All this will help you without using a mouse.

+1
source share

All Articles