Here a simple code which I have to add on project:
import java.io.*;
import java.util.Scanner;
public class Ana {
static public void main(String[] args)
{
try{
File gecicidosya=new File("D:\\B.txt");
File sdosya=new File("D:\\A.txt");
Scanner oku = new Scanner(sdosya);
BufferedWriter yaz=new BufferedWriter(new FileWriter(gecicidosya));
while(oku.hasNextInt())
{
System.out.println("while started");
oku.nextInt();
System.out.println("file readed");
}
oku.close();
yaz.close();
System.out.println("finish");
}
catch(Exception e)
{
System.out.println("problem "+ e);
}
}
}
But it does not work :( It does not give any error. It writes "finish" but even D:\\A.txt is about 60kb while(oku.hasNextInt()) doesn't work :( Can you please help me about it ? (I use "scanner" instead of bufferreader because bufferreader cannot scan for integer. anyway that it is not important)
Thanks!