Q:

The comment /* */ don't work when a string include "*/"

The comment of Code 1 works well in Android Studio.
After I insert the chars "*/" to the string s, the comment of Code 2 cause error, how can I fix it? Thanks!
Code 1
    /*
    String s="";
   */

Code 2
   /*
    String s="*/";
   */

A:

The only possibility to use a multi-line comment is to change your code to an equivalent code that doesn't include the */ in the string.
For example:
Splitting */ in two strings
/*
String s = "*" + "/";
*/

Or using a constant
public static final String END_COMMENT = "*/";

/*
String s = END_COMMENT;
*/

Or writing as unicode chars
/*
String s = "\U002A\U002F";    
*/

All this solutions are useful if you have many lines to comment.
If you have only one you can use the single line comment as follow:
//String s = "*/";

