Question: easyString ChallengeHave the function stringchall enge ( sen ) take the sen parameter being passed andreturn the longest word in the string. If thereare two

easyString ChallengeHave the function stringchall enge (sen)take the sen parameter being passed andreturn the longest word in the string. If thereare two or more words that are the samelength, return the first word from the string withthat length. Ignore punctuation and assumesen Will not be empty. Words may also containnumbers, for example Hello world123567Once your function is working, take the finaloutput string and replace all characters thatappear in your challengeToken with -[CHAR-.Your ChallengeToken: I3c21x4e7aExamplesInput: fun& !! tineOutput: tineFinal Output: tin--e--Input: "I love dogs"Output: loveJava98101112131415161172import java.util.;import java.io.;class Main fpublic static String StringChallenge (String sen){1/ code goes herereturn sen;public static void main (String] args){1/ keep this function call hereScanners= new Scanner(System.in);System.out. print (StringChallenge (s.nextLine())); and give code in java
 easyString ChallengeHave the function stringchall enge (sen)take the sen parameter being

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!