0
How can I add space between names in output
13 odpowiedzi
+ 4
"AJ" + " " + "Milkas"
+ 4
Kailash Yandrapu In which programming language are you talking about?
+ 4
Ugulberto Sánchez actually bro he talk about in Java
+ 3
Kailash Yandrapu If you input the string by user
Like I store name in name variable then you can write like this:-
System.out.println("Hello "+name);
'+' means concatenation and after that you give space
And if you want simple print then you can write like this:-
System.out.println("Hello "+"Kailash");
Hope you understand it.
+ 3
Kailash Yandrapu I don't understand it properly, you use concat method it's correct or you can use '+' symbol through concatenation it is also another simple way to do that
+ 3
Kailash Yandrapu read your question carefully what you ask?
+ 2
"Ram"+" "+"Raj"
"Ram "+"Raj"
using String concatination method also you can add space between names
+ 2
Sakshi
In java
Take the space as a string and then concate with he names
+ 1
Sakshi
https://code.sololearn.com/c5N0866r2v49/?ref=app
I am telling about the concat method in string class in java
0
Sakshi you are telling that it is simple way to add space between two strings
Am i right?
0
Sakshi your approach using + is simple way but i am saying that there is another approach also
0
; 1 space and [ ] is line space if I remember correctly. Python
0
Sakshi heheh 😓didn’t notice