0

Today is my first time learning Java and I have learn lots of shortcuts. One of them is the Ctrl + / which makes a line of code into a single line comment. After saving a specific Java script, I realised that 35+ lines of codes are now comments and I cannot turn it back into a code after the save. How can I remove it again?

//      int age = 12;

//      double amount = 100.00;

//      System.out.println(age);

//      System.out.println("Amount: " + amount);

(this is the saved version)

If you would like to recreate this problem, copy and save this in Eclipse, come back to that file and try to uncomment, and if you do manage to find a way, please share it.

It's a Java class, with public static void main option checked, within a Java project.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Ashy
  • 1
  • 1

1 Answers1

2

You can select the block and use shortcut Ctrl + Shift + \.

Alternatively, right-click on the selection and then use the Source ยป Remove Block Comment option.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Kris
  • 8,680
  • 4
  • 39
  • 67