import java.io.*;
public class SpeedCam
{
private static final String FILE_SPEC0 = "C://camera0_test1.dat";
private static final String FILE_SPEC1 = "C://camera0_test2.dat";
private static final int SPEED_LIMIT = 50;
public static void processData()
{
FileInputStream fis;
DataInputStream dis;
FileOutputStream fos;
DataOutputStream dos;
String regNum;
int Time1;
int Time2;
int Time3;
String VehicleType;
try
{
fis = new FileInputStream(FILE_SPEC0);
dis = new DataInputStream(fis);
fos = new FileOutputStream(FILE_SPEC1);
dos = new DataOutputStream(fos);
while(true)
{
try
{
regNum = dis.readUTF();
Time1 = dis.readInt();
Time2 = dis.readInt();
Time3 = dis.readInt();
VehicleType = dis.readUTF();
System.out.print(regNum+"\t"+Time1+"\t"+Time2+"\t"+Time3+"\t"+VehicleType);
}
catch(Exception e)
{
fis.close();
fos.close();
}
}
}
catch(Exception e)
{
}
}
public static void main(String[] args)
{
processData();
}
}
I don't have even the vaugest idea what's wrong with this, but its flat out refusing to print. The file exists, and supposedly contains relevant information, although i can't confirm this. Does anyone have enough experience to be able to guide me down the right path so i can get started on this application
Im screwed. i can't make this program output index, and its absolutely killing me. Not supposed to fix any errors unless theyre syntax, so that's not what needs sorting...just a couple of lines to make it run
Anyone can help
Spoiler:
import java.util.Scanner;
public class Annex1 {
private static String calcIndex(int gr, int wo, int con)
{