Question: finish following program, so it can compile and run successfully public class Tokenizer { static in trans[][] = {{},{....}; static int symNum(char sym){ switch(sym){ case

finish following program, so it can compile and run successfully

public class Tokenizer { static in trans[][] = {{},{....};

static int symNum(char sym){ switch(sym){ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return 0; case 'e': return 1; case 'E': return 2; case '+': return 3; case '-': return 4; default: throw new RuntimeException("invalid symbol"); } } public static boolean num(String str){ int state = 0; int I = 0; while ( i < str.length()){ state = trans[state][symNum(str[i])]; i++; } if (state = 1 || state == 3 || state = 6){ retunr true; } else { retunr false; } }

public static void main(string []args){

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!