Question
How can I resolve the lex(String) is undefined for the type main? public class main { public static void main(String[] args) { //creating file object
How can I resolve the lex(String) is undefined for the type main?
public class main {
public static void main(String[] args) { //creating file object File file = new File("input.txt"); //scanner object to scan the input file Scanner sc = null; String input = ""; try { sc = new Scanner(file); //traversing the entire input file untile all the lines found while (sc.hasNextLine()) { input += sc.nextLine()+" "; } } catch (FileNotFoundException e) { System.out.println("File Not Found. Please Check Input File"); } // Create tokens and print them ArrayList
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