Driver code
public static void main ( String [ ] args ) { String str1 = " abca " , str2 = " efad " ; if ( check ( str1 , str2 ) ) System . out . println ( " Yes " ) ; else System . out . println ( " No " ) ; } }