+ 1
What do the two double quotations do in concatenation
String firstName,lastName; firstName="Newton"; lastName="Volleyman"; System.out.println("My name is"+firstName+" "+lastName);
3 odpowiedzi
+ 1
in the double quotations you insert a simple space character, so that the output will be : My name is Newton Volleyman;
If you don't put that the output would be: My name is NewtonVolleyman;
It is just used to make the output look clear and easy to read
+ 1
Double quotes(") are only used to print the text in that command. If double quotes aren't used, it will take it as to print the value of that variable.
0
😀😀😀😁😀