package day21_JavaMethods; public class Homework { // 5. Write a Java method to count all words in a string. Go to the editor // Test Data: // Input the string: The quick brown fox jumps over the lazy dog. // Expected Output: // // Number of words in the string: 9 //advanced, put in a new class and call the method from the main method. }