/** the StringEdit class concat, replace, trim */ import java.util.Scanner; public class StringEdit { public static void main(String[] args) { String name1="John Doe"; System.out.println("name1 is " + name1); String name2 = "Alice"; System.out.println("name2 is " + name2); String name3= "John Q. Adams"; System.out.println("name3 is " + name3); } /* Write a method that accepts 2 Strings as parameters, text and pattern. * The method will return an int representing the number of times the * pattern string occurs in the text string. * In main: * read in a text and pattern (you can use files if you want) * call the method * print the number of occurrences. */ }