For this Question: Given two strings A and B, check if the string A is a sub-string of string B or not.First line of input contains a string A, the second line of the input contains the string B.

Constraints:-
1 < = |A| < = |B| < = 1000

Note:- String will only contain lowercase english letters.Print "Yes" if the string A is the substring of string B, else print "No".Sample Input:-
ewt
newton

Sample Output:-
Yes

Sample Input:-
erf
sdafa

Sample Output:-
No, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        String A=br.readLine();
        String B=br.readLine();


        int j=0;
        boolean flag=false;
        for(int i=0;i<B.length();i++)
        {
            if(A.charAt(j)==B.charAt(i))
            {
                j+=1;
            }
            else
                j=0;
            if(j==A.length())
            {
                System.out.println("Yes");
                flag=true;
                break;
            }
        }
        if(!flag)
            System.out.println("No");
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?