|
hii
am working in program i finished but i faced problem :
the file that i want to read it is like this
2 2
2 5
4 9
0 0
my code is
Code:
public static void main(String[] args) { try { Scanner read = new Scanner(new File("file.in")); while(read.hasNext()) { ?????????????? } myLinkedList LL = new myLinkedList (); for(int i=1;i<=t;i++) { LL.addLast(i); } LL.remove(s); } // catch catch(Exception e) { System.out.println(e); } }
look when i put s and t !
s is : 2 2 4
t is : 2 5 9
and stop reading when it is reach the 0 // i have no problem with this step
but what am stack in is how i can read file as the way i explained.
because this step is what i need to finish my project.
|