Question: I keep getting a Could not find or load main class error in my java program heres my code: import java.util.*; import java.io.*; public class
I keep getting a Could not find or load main class error in my java program
heres my code:
import java.util.*; import java.io.*; public class Lab4 {
public static void main(String[] args) throws Exception { if (args.length <= 0) { System.out.println("No text file was entered on command line"); System.exit(0); }
BufferedReader infile = new BufferedReader(new FileReader(args[0])); ArrayList
static String canonical(String word) { char[] letters = word.toCharArray(); Arrays.sort(letters); return new String(letters); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
