I got some java code below, and upon trying to compile it in my unix environment, i get the following error
()[/home/mgt/gmat]> javac Downloader.java
Downloader.java :37: ';' expected
private enum ReportFormat {
^
1 error
This is a portion of the code below
import java.io.File;
import java.io.FileOut putStream;
import java.io.IOExcep tion;
import java.io.InputSt ream;
import java.io.OutputS tream;
import java.io.PrintSt ream;
import java.io.Unsuppo rtedEncodingExc eption;
import java.net.HttpUR LConnection;
import java.net.URL;
import java.net.URLEnc oder;
import java.security.D igestOutputStre am;
import java.security.M essageDigest;
import java.text.DateF ormat;
import java.text.Simpl eDateFormat;
import java.util.Date;
/**
* Sample GMAT Score Data File Downloader.
*
* @version $Revision: #11 $ submitted $DateTime: 2008/08/18 14:43:29 $ by $Author: chetds $
* @author Dan Syrstad
*/
public class Downloader {
private static final String HOSTNAME = "www.domain.com ";
private static final String RELATIVE_URL = "/entry/gmat/download.jsp";
private static final DateFormat logDateFmt = new SimpleDateForma t("yyyy-MM-dd hh:mm:ss: ");
private static PrintStream logStream = System.out;
private enum ReportFormat {
TXT,
CSV;
};
// Discourage instantiation
private Downloader() { }
private static void emitUsageAndExi t() {
log("Usage: Downloader [-file filename] [-log log-file] [-host hostname] [-format [TXT | CSV]] username password GMAT-progr$
System.exit(1);
}
/**
()[/home/mgt/gmat]> javac Downloader.java
Downloader.java :37: ';' expected
private enum ReportFormat {
^
1 error
This is a portion of the code below
import java.io.File;
import java.io.FileOut putStream;
import java.io.IOExcep tion;
import java.io.InputSt ream;
import java.io.OutputS tream;
import java.io.PrintSt ream;
import java.io.Unsuppo rtedEncodingExc eption;
import java.net.HttpUR LConnection;
import java.net.URL;
import java.net.URLEnc oder;
import java.security.D igestOutputStre am;
import java.security.M essageDigest;
import java.text.DateF ormat;
import java.text.Simpl eDateFormat;
import java.util.Date;
/**
* Sample GMAT Score Data File Downloader.
*
* @version $Revision: #11 $ submitted $DateTime: 2008/08/18 14:43:29 $ by $Author: chetds $
* @author Dan Syrstad
*/
public class Downloader {
private static final String HOSTNAME = "www.domain.com ";
private static final String RELATIVE_URL = "/entry/gmat/download.jsp";
private static final DateFormat logDateFmt = new SimpleDateForma t("yyyy-MM-dd hh:mm:ss: ");
private static PrintStream logStream = System.out;
private enum ReportFormat {
TXT,
CSV;
};
// Discourage instantiation
private Downloader() { }
private static void emitUsageAndExi t() {
log("Usage: Downloader [-file filename] [-log log-file] [-host hostname] [-format [TXT | CSV]] username password GMAT-progr$
System.exit(1);
}
/**
Comment