Create a Java program that finds the longest word from a given sentence.
Example:
Input:
Java programming is very interesting
Output:
Longest word: programming
Length: 11
Requirements:
Take sentence input from user
Split sentence into words
Find the word with maximum length
Create a Java program that finds the longest word from a given sentence.
Example:
Input:
Java programming is very interesting
Output:
Longest word: programming
Length: 11
Requirements:
Take sentence input from user
Split sentence into words
Find the word with maximum length