+ 1
I have not understand the single line and multi line work in java
3 Respuestas
+ 3
In Java :
"//" is used for single line comments.
Ex- // hello my self kajal.
Multi line comments in Java start with /* and end with */. You can comment multiple lines just by placing them between .
Ex- /* hello, this is the way to write multi line comments in java */
Ex for both:
public class program{
public start void main(String[] args){
System.out.println("hello Omi") ; // write your single line comment.
System.out.print("how are you") ;
/* I hope you understand that.
https://www.sololearn.com/learn/Java/2138/?ref=app */
+ 2
Comment to each quiz is at lower left, not upper right.
https://www.sololearn.com/post/131750/?ref=app
There are plenty of explanations in comment of these lessons:
https://www.sololearn.com/learn/Java/2138/
+ 1
//Single line comment is just 1 line..
/*
Multiline
Comment
Spans across
Multiple
Lines
*/
It's there so you can make notes what your code is doing incase you forget.