I am trying to wright a program for a Gallery this code is ment to add a painting to the catalogue file and every time i run it it displays an error "Error: ';' expected"
CODE
public class Catalogue
{
// CONSTANTS ***************************************************************
final String CAT_FILE = "piclist.txt";
final String TEMP_FILE = "temp.txt";
final int[] PREMIUMS = {0, 3, 6, 10, 15,
25, 40, 60, 85, 120, 160};
final int SALE_MULTIPLE = 150;
// INSTANCE VARIABLES ******************************************************
// (none)
// CONSTRUCTORS ************************************************************
/**
* Constructor
*/
Catalogue ()
{
// no actions
}
// METHODS
void addPicture(int pCatNum, String pTitle, int pCategory)
{
try
{
FileWriter fw = new FileWriter(CAT_FILE, true);
PrintWriter pw = new PrintWriter(fw);
pw.println(pCatNum + "\t" + pTitle + "\t" + pCategory);
fw.close();
}
catch (java.io.IOException ioe)
{
User.message("ERROR: unable to write to catalogue file");
User.message("EXCEPTION: " + ioe);
}
}
can anyone help me please