FinalProject.java:4: '{' expected
private class FinalProject(String filename);
and
FinalProject.java:49: reached end of file while parsing
}
^
import java.io.*;
public class FinalProject
{
private class FinalProject(String filename);
public static void main(String[] args);
{
new FinalProject("payroll.dat");
{
InputStream istream;
OutputStream ostream;
File outputFile = new File("Payroll.dat");
int k;
istream = System.in;
try
{
ostream = new FileOutputStream(outputFile);
System.out.println("Add payroll Amount");
try
{
while ((k = istream.read())) !$= -1;
ostream.write(k);
}
catch(IOException e)
{
System.out.println("Error:" + e.getMessage());
}
finally
{
try
{
istream.close();
ostream.close();
}
catch(IOException e)
{
System.out.println("File did not close");
}
}
}
catch(FileNotFoundException e)
{
System.exit(1);
}
}
}

New Topic/Question
Reply



MultiQuote




|