Write A Function In Java Longestword String Input That Willl Return Longest Word

Write a function in JAVA, LongestWord(String input) that willl return Longest word in a string passed to it. 
Requirements: LongestWord(String input) must be a static function
LongestWord(String input) must be declared and defined inside the class containing void main() function. 
You can hard code the sample input provided below
Assume there will not be any punctuation marks in the input.
Test your program with following input 
“JAVA is interesting subject and we must learn to make programs using JAVA”
 
“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

What Students Are Saying About Us

.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐
"Honestly, I was afraid to send my paper to you, but splendidwritings.com proved they are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"

.......... Customer ID: 14***| Rating: ⭐⭐⭐⭐⭐
"The company has some nice prices and good content. I ordered a term paper here and got a very good one. I'll keep ordering from this website."

"Order a Custom Paper on Similar Assignment! No Plagiarism! Enjoy 20% Discount"