What is the use of println statement? How is it different from print statement?
samirafarooqui8:
Thank you!
Answers
Answered by
3
The println statement transfers the control to the next line , while in the print statement the control remains on the same line
For eg:-
If 2 statements are like this ---->. System.out.println("I use");
System.out.print("Brainly");
Then the output will be :-
I use
Brainly
NOTE:-The println statement works for the next line.
For eg:-
If 2 statements are like this ---->. System.out.println("I use");
System.out.print("Brainly");
Then the output will be :-
I use
Brainly
NOTE:-The println statement works for the next line.
Similar questions