Do you know how to write, compile and run a
java program? That is the first step. Assuming you can do that, write this one in teeny tiny steps. My first go at it would do nothing more than prompt for the input - I.e. print the "Input Sentence:".
once you have it doing that, see if you can actually take in the input.
Once you do that, see if you can figure out how to find the individual words.
Once you do that, try and find the longest word
etc.
Note that at each step, you may have to write some extra code to prove what you did works, and then throw that away later. Once you think you have read in the input, you may want to print it out again to verify you REALLY have captured it. Once you KNOW that works, you can remove the echoing out the input.
If you tackle a problem like this in baby step, it's much easier.