Hey guys ,
I am working on a print queue read from a file but I can only read the input file and parse it, I don't know how to load the elements from the input to the queue.
The file input looks like this :q,5,8
Do any of you guys have an idea of what i need to do ?if (line.charAt(0) == 'q') { String A = line.substring(0,line.indexOf(",")); String B = line.substring(line.indexOf(",")+1,line.lastIndexOf(',')); String C = line.substring(line.lastIndexOf(',')+1,line.length()); jobInfo.setPrintJobInfo(A,Integer.parseInt(B),Integer.parseInt(C))mainQueue.addQueue(jobInfo); public static void setPrintJobInfo(String A,int B,int C) { type = A; job = B; cycle = C; }
Thanks