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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started