What does the // means in java.? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What does the // means in java.?

ex:20//6

29th Aug 2018, 6:13 AM
Avtar Singh
Avtar Singh - avatar
2 Answers
+ 1
// is used to mark the rest of the line as a comment. It isn't an operator and doing 20//6 will most likely give you an error. You can also start a multiple line comment by doing /* at the start and */ when you want to end it.
29th Aug 2018, 6:18 AM
Alexandru Turculet
Alexandru Turculet - avatar
- 2
this is used in python for absolute results. 14//3=4
29th Aug 2018, 7:24 AM
Mohd Zaki
Mohd Zaki - avatar