0
Write a program to display the longest word along with the number of character in it...
input:: we are learning scanner class in java output:: the longest word : learning number of character : 8
2 ответов
0
What you need to do is first "split" the string on every space, and hold the words in an array, then with a loop you go into every index with the length property, hold the string and compare with the next index, and hold the largest one until you are done, and then just print the info you need, like the string and it's length. Good luck Sushil.
0
without using split method because this is not in our syllabus i.e. icse