why wont this tester complie
        Posted  
        
            by 
                user1678800
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1678800
        
        
        
        Published on 2012-10-09T01:26:19Z
        Indexed on 
            2012/10/09
            3:37 UTC
        
        
        Read the original article
        Hit count: 411
        
java
student name and id and testgrade need to compile with tester but the student class has some problem i dont know what it is and the error message is Error: Syntax error on token "(", . expected this needs to complie with the tester class to be able to run
    public class Student 
{
  public static void main(String[] args) 
  { 
    // instant varible for name, id , and test grade
    private String name;
    private int id;
    private int testgrade;
    /**
     * construct class
     * @parm String newName
     * @parm String newId
     */
    public Student(String newName, int newId);
   {
   name = newName;
   id = newId;
   }
   /**
    * getName method that return instant varible name
    */
    public String getName()
    {
    return name;
    }
   /**
    * getId method that return instant varible id
    */
    public int getId()
    {
      return id;
    }
    /**
     * setGrade method that sets the test grade variable
     * 
     * @param int grade
     */
    public void setGrade(int grade)
    {
      testGrade = grade;
    }
   /**
    * getGrade method that sets test grade instance variable
    * 
    * @param int grade
    */   
    public int getGrade()
    {
      return testGrade;
    }
 }
}
        © Stack Overflow or respective owner