Buzz Code
Published in

Buzz Code

Java 8 | Eclipse Shortcut Keys

Hi guys! Before we actually start the Java session, I thought it’d be better for you to know some of the shortcuts first. So I’ll give you some of them that is very basic and also very useful at the same time.
If you missed my last post, so you don’t even know how to create the file, please checkout below!

[comment]

Like many other platforms, You can make eclipse to ignore some of your code with putting two slashes(//) in front of the code. And also you can make the whole line invisible to eclipse by using ctrl + /.

< ctrl + / >

you can drag or just put your typing bar on the line you want to make into a comment, and press ctrl and the slash(/ ) together. And if you press ctrl+/ again, the comment will become a normal code again.

[sysout]

System.out.println(); displays the result on the console. From now on, you are going to use this A LOT, but it’s too long to type all of them. So the way to shorten the process is
(1) type sysout
(2) press ctrl + space bar

< ctrl + space bar >

[Running Code]

I’ll put a random text into the println method.

Now if I press ctrl + F11 to run this on the console.

< ctrl + F11 >

Then you can see the text on the console, which is in the println.

[Moving row]

And you can move the whole row with using Alt + ↑/↓ .

< Alt + ↑/↓ >

Put the typing bar on the row that you want to move and press Alt + , it goes up, and Alt + ↓ goes down. If you drag a few rows and press this shortcut, you can move several rows.

[deleting row]

When you don’t need a entire line or more than two, just press ctrl + D.

< ctrl + D >

I hope it was useful to you too. These are not all of the shortcut keys, so I’m gonna keep post some more of them when we need. Thank you for reading my post today as well, See you!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store