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 Odpowiedź
+ 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