Finite State Machine: Check Whether String Contains ‘abb’ or not

public class Noabb
public static void main(String[] args)throws IOException
BufferedReader obj = new BufferedReader (new InputStreamReader (;
int state[][]={{1,0},{1,2},{1,3},{3,3}};
int q =0;
String str;
System.out.println(“Enter your string”);

for(int i=0;i

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.