Question: Only java. Please send me Working program 12. Miscellaneous String Operations Write a class with the following static methods: wordcount. This method should accept a
12. Miscellaneous String Operations Write a class with the following static methods: wordcount. This method should accept a reference to a String object as an argument and return the number of words contained in the object. arrayTostring. This method accepts a char array as an argument and converts String object. The method should return a reference to the string object. mostFrequent. This method accepts a reference to a String object as an argum returns the character that occurs the most frequently in the object. replaceSubstring. This method accepts three references to string objects as argum Let's call them stringl, string2, and string3. It searches stringi for all occurrences of string2. When it finds an occurr example, suppose the three arguments have the following values: ence of string2, it replaces it with string3. For "the dog jumped over the fence string2: "the string3: "that With these three arguments, the method would return a reference to a string object with the value "that dog jumped over that fence". Demonstrate each of these methods in a complete prograrm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
