+ 1

What does x = 5 symboliz in a comment?

15th Jan 2019, 9:35 PM
Yesenia Silva
6 Respostas
0
If you're talking about this lesson, x=5 isn't part of a comment. https://www.sololearn.com/learn/Java/2138/ A comment starts after two forward slashes "//".
15th Jan 2019, 10:00 PM
Diego
Diego - avatar
+ 1
No, "x=5;" is just part of a code. You can add as much comments as needed anywhere in your program.
15th Jan 2019, 10:06 PM
Diego
Diego - avatar
+ 1
Okay I think I get it...at least I'm starting to get it.
15th Jan 2019, 10:09 PM
Yesenia Silva
0
my guess is that x holds the value of 5? most likely the comment is just showing what value the x hold in the script. If i am wrong then please correct me...
15th Jan 2019, 9:47 PM
Dingo
Dingo - avatar
0
Does that mean the amount of comments at that particular point in the code?
15th Jan 2019, 10:03 PM
Yesenia Silva
0
well, if I was coding then I would definitely put it in my code as a reminder so I don’t have to go back trying to figure what x in line 25 is holding.
15th Jan 2019, 10:06 PM
Dingo
Dingo - avatar