@@ -0,0 +1,1053 @@
+// %D0%9D%D0%B0%D0%BF%D0%B8%D1%88%D0%B5%D1%82%D0%B5 %D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B0, %D0%BA%D0%BE%D1%8F%D1%82%D0%BE %D0%BE%D1%82%D0%BA%D1%80%D0%B8%D0%B2%D0%B0 %D0%BA%D0%BE%D0%BB%D0%BA%D0%BE %D0%BF%D1%8A%D1%82%D0%B8 %D0%B4%D0%B0%D0%B4%D0%B5%D0%BD %D0%BF%D0%BE%D0%B4%D0%BD%D0%B8%D0%B7 %D1%81%D0%B5 %D1%81%D1%8A%D0%B4%D1%8A%D1%80%D0%B6%D0%B0 %D0%B2 %D1%82%D0%B5%D0%BA%D1%81%D1%82. %0A%0Aimport java.util.Scanner;%0A%0Apublic class Solution %7B%0A%09%0A%09public static int getNumberOfSubstringInstances(String substring, String text) %7B%0A%09%09int numberOfInstances = 0;%0A%09%09substring = substring.toLowerCase();%0A%09%09text = text.toLowerCase();%0A%09%09%0A%09%09int instanceIndex = 0;%0A%09%09while (true) %7B%0A%09%09%09instanceIndex = text.indexOf(substring, instanceIndex+1);%0A%09%09%09if (instanceIndex == -1) %7B%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%09numberOfInstances++;%0A%09%09%7D%0A%09%09%0A%09%09return numberOfInstances;%0A%09%7D%0A%09%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Scanner read = new Scanner(System.in);%0A%09%09%0A%09%09String substringToFind = read.next();%0A%09%09String text = %22We are living in a yellow submarine. We don't have anything else. Inside the submarine is very tight. So we are drinking all the day. We will move out of it in 5 days.%22;%0A%09%09%0A%09%09int numberOfSubstringInstances = getNumberOfSubstringInstances(substringToFind, text);%0A%09%09%0A%09%09// Print end result%0A%09%09System.out.println(numberOfSubstringInstances);%0A%09%09%0A%09%09// Close scanner%0A%09%09read.close();%0A%09%7D%0A%7D%0A

Create 14.2.java