+ 3

Anyone can tell that how can I print two names in java ??

7th Apr 2021, 3:40 PM
Shashank
Shashank - avatar
3 Réponses
+ 1
Thankyou
7th Apr 2021, 3:52 PM
Shashank
Shashank - avatar
+ 1
There's three ways actually: String name1 = "John Doe"; String name2 = "Jane Smith"; System.out.println(name1 + name2); System.out.printf("%s %s", name1, name2); System.out.print(name1 + name2 + "\n");
4th Feb 2022, 4:05 AM
HydroShock
HydroShock - avatar
0
System.out.print("name"+"name");?
7th Apr 2021, 3:51 PM
Ananiya Jemberu
Ananiya Jemberu - avatar