194k views
1 vote
Which of the following is the correctsyntax for commenting in Java?# Enter CommentsHere/* EnterComments Here*/** Enter CommentsHere **

User Vitality
by
7.7k points

1 Answer

4 votes

Answer:

/* EnterComments Here*/

Step-by-step explanation:

/* EnterComments Here*/ is the right syntax for comments in java.

we can use double farword slash (//) for single line comment and for mutliple line we can use /* comments here */ and for documentation comment we use below syntax-

/**

*

*

*/

User Eamonn Kenny
by
7.5k points