1) Open the java file in which comments are to be removed.
2) Press Ctrl+F if you are using windows, Cmd+F in Mac OS.
3) Select Regular Expressions in the Find Menu.
4) Replace the below two expressions with empty string:
i) (//[^\n]*)
ii) (?s)/\*.*?\*/
5) This action will remove all the comments -> Single Line as well as multiple line comments from the java file.
27,417 total views, 1 views today
(Visited 15,998 times, 1 visits today)