give an input string.then length of each word and concatenate them together | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

give an input string.then length of each word and concatenate them together

ex-1:good and bad o/p: 433 ex-2:eclipse for java 0/p: 734

20th Jan 2017, 5:27 PM
Sai venkata ram T
1 Réponse
+ 2
String input = "good and bad"; String s[] = input.split(" "); for(String a : s){ System.out.print(a.length()); }
20th Jan 2017, 5:43 PM
Robobrine
Robobrine - avatar