Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to comment the whole block of code that already contaning /* comments (Java)?

Tags:

java

Let see this example in Java,

    public void methodY(){
        /* some explain ...... */
        int x=1;
    } 

Ok, now I want to comment the whole methodY so I put methodY inside /* */ like this:

    /*
    public void methodY(){
        /* inside comment ...... */
        int x=1;
    } 
    */
However, the inside comment /* inside comment ...... */ prevent that to be happen. 

In Java, do we have a way to comment the whole block of code that already containing /* comments?

like image 497
Tum Avatar asked Dec 16 '22 02:12

Tum


1 Answers

Comment this using inline comment //.

Typically IDEs support Ctrl-/ on selected block.

like image 93
AlexR Avatar answered Mar 27 '23 23:03

AlexR