package apetrov;

public class TestTask{
	
	public boolean contains(String origin, String sub){
		
		char[] originArray = origin.toCharArray();
		char[] subArray = origin.toCharArray();

		int sizeSub;
		boolean result = false;

		for(int i = 0; i < originArray.length; i++){
			if(originArray[i] == subArray[0]){
				sizeSub = 1;
				if(subArray.length == sizeSub){
					result = true;
				}
				int index = i;

				for(int j = 1; j < subArray.length; j++){
					if(subArray[j] == originArray[index+1]){
						sizeSub++;
						if(sizeSub == subArray.length){
							result = true;
						}
					}
					index++;
				}
			}
		}
		return result;	
	}
}
@@ -15,32 +15,224 @@
 v;%0A%0A
-public class TestTask%7B%0A%09
+/**%0A* %D0%9A%D0%BB%D0%B0%D1%81%D1%81 %D0%BF%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D1%8F%D1%8E%D1%89%D0%B8%D0%B9, %D1%87%D1%82%D0%BE %D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B0 sub %D1%8F%D0%B2%D0%BB%D1%8F%D0%B5%D1%82%D1%81%D1%8F %D0%BF%D0%BE%D0%B4%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%BE%D0%B9 origin.%0A*/%0Apublic class TestTask%7B%0A%09%0A%09/**%0A%09 * %D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D1%8F%D0%B5%D0%BC, %D1%87%D1%82%D0%BE %D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B0 sub  %D1%8F%D0%B2%D0%BB%D1%8F%D0%B5%D1%82%D1%81%D1%8F %D0%BF%D0%BE%D0%B4%D1%81%D1%82%D0%BE%D0%BA%D0%BE%D0%B9 origin%0A%09 * @param origin, sub%0A%09 * @return result: true/false%0A%09 */
 %0A%09pu
@@ -833,8 +833,9 @@
 t;%09%0A%09%7D%0A%7D
+%0A

Update TestTask