@@ -0,0 +1,1835 @@
+public class HelloStringSearch %7B%0A    static private String string = %22%5C%22My name is Ozymandias, king of kings:%5Cn%22 + %0A            %22Look on my works, ye Mighty, and despair!%5C%22%22;%0A    %0A%09public static void main(String...args) %7B%0A%09%09System.out.println(%22Hello String Search!%22);%0A%09%09%0A%09%09System.out.printf(%22%5Cn%25s%5Cn%5Cn%22, string);%0A%09%09%0A%09%09// 1. Forward Search%0A%0A%09      int idx01 = string.indexOf('O');%0A%09      int idx02 = string.indexOf('M', idx01);%0A%09      int idx03 = string.indexOf(%22kings%22);%0A          int idx04 = string.indexOf(%22and%22, idx03);%0A%0A          System.out.printf(%22string.indexOf('O'); = %25s%5Cn%22, string.substring(idx01, idx01 + 10));%0A          System.out.printf(%22string.indexOf('M', idx01); = %25s%5Cn%22, string.substring(idx02, idx02 + 6));%0A          System.out.printf(%22string.indexOf(%5C%22kings%5C%22); = %25s%5Cn%22, string.substring(idx03, idx03 + 5));%0A          System.out.printf(%22string.indexOf(%5C%22and%5C%22, idx03); = %25s%5Cn%22, string.substring(idx04, idx04 + 3));%0A%0A%09%09// 2. Backward Search%0A%09%09%0A          int idx11 = string.lastIndexOf('a');%0A          int idx12 = string.lastIndexOf('i', idx11);%0A          int idx13 = string.lastIndexOf(%22and%22);%0A          int idx14 = string.lastIndexOf(%22and%22, --idx13);%0A%0A          System.out.println(%22---%22);%0A          System.out.printf(%22string.lastIndexOf('a'); = %25s%5Cn%22, string.substring(idx11));%0A          System.out.printf(%22string.lastIndexOf('i', idx11); = %25s%5Cn%22, string.substring(idx12, idx12 + 6));%0A          System.out.printf(%22string.lastIndexOf(%5C%22and%5C%22); = %25s%5Cn%22, string.substring(idx13, idx13 + 13));%0A          System.out.printf(%22string.lastIndexOf(%5C%22and%5C%22, --idx13); = %25s%5Cn%22, string.substring(idx14, idx14 + 6));%0A%0A%09%09// 3. Contains%0A%0A          boolean containsPhilip = string.contains(%22Philip%22);%0A          System.out.println(%22---%22);%0A          System.out.printf(%22string.contains(%5C%22Philip%5C%22); = %25s%5Cn%22, containsPhilip);%09        %0A%09%7D%0A%7D%0A

Create HelloStringSearch.java