
Comments
Everything you write in Java is a statement. Every statement ends with the semicolon ;
. If you want to comment your code there are two ways to do it. If you’re leaving a short comments, you can use this \\
.
//this is a comment
int x = 10;
If you’re writing a long comment, then use this format:
/*
anything in between the slash and stars is a comment.
You need to close out the comment the star slash
*/
int x = 10;