Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Data Structures Organizing Data Serialization

Charles Harpke
Charles Harpke
33,986 Points

Keyboad shortcut for commenting out multiple lines of code?

What is the keyboard shortcut for commenting multiple lines of code again??

4 Answers

Marko Mitrovic
Marko Mitrovic
19,888 Points

For single line comment you can use Ctrl + / and for multiple line comment you can use Ctrl + Shift + / after selecting the lines you want to comment in java editor.

On Mac/OS X you can use Cmd + / to comment out single lines or selected blocks.

Resource: http://stackoverflow.com/questions/5534748/eclipse-comment-uncomment-shortcut

Charles Harpke
Charles Harpke
33,986 Points

ooops:

Workspace Editor Shortcuts

Highlight lines: [Shift + ↑] or [Shift + ↓] Comment selected lines: [⌘ + /] or on Windows [Ctrl + /]

NVM

It works.

Otto linden
Otto linden
5,857 Points

how do you get the /? just press 7? or should i do ctrl+shift+7?

Lee Reynolds Jr.
Lee Reynolds Jr.
5,160 Points

/* code code code code code code code code code code */