Student's Result program in Java
<pre><code>import java.io.DataInputstream;
class Student
{
int roll;
void getdata(int r)
 {
 roll=r;
 }
void putroll()
 {
 System.out.println("The roll number is: "+roll);
 }
}

class Test extends Student
{
int sub1,sub2;
void getmarks(int a, int b)
 {
 sub1=a;
 sub2=b;
 }
void putmarks()
 {
 System.out.println("Marks 1= "+ sub1 + "\n Marks 2= "+sub2);
 }

interface Sport
{
float spt=6.0f;
void putspt(float num);
}


class Result extends Test implements Sport
{
float total;
float n;
public void putspt(float num)
 {
 x=num;
 if(x&gt;6 &amp;&amp; x&lt;=10)
 System.out.println("Sport= "+x);
 else
 System.out.println("Sport= "+spt);
 }
void display()
 {
 if(x&gt;6 &amp;&amp; x&lt;=10)
 total=sub1+sub2+x;
 else
 total=sub1+sub2+spt;
 putroll();
 putmarks();
 if(x&gt;6 &amp;&amp; x&lt;=10)
 putspt(x);
 else
 putspt(spt);
 System.out.println("Total marks= "+total);
 }
}


class Student_Test
{
public static void main(String a[]) throws Exception
 {
 DataInputStream ds = new DataInputStream(System.in);
 int a,b,c;
 float d;
 try
  {
  int t;
  System.out.println("\nEnter total no. of Students:");
  t=Integer.parseInt(ds.readLine());
  for(int i=1;i&lt;=t;i++)
   {
    System.out.println("Enter Roll no.:");
    a=Integer.parseInt(ds.readLine());
    System.out.println("Enter the marks of two subjects:");
    b=Integer.parseInt(ds.readLine());
    c=Integer.parseInt(ds.readLine());
    System.out.println("Enter Sports marks:");
    d=Integer.parseInt(ds.readLine());
    Result r=new Result();
    r.getroll(a);
    r.getmarks(b,c);
    r.putspt(d);
    r.display();
   }
  }
  catch(Exception e)
    {
    System.out.println("ERROR");
    }
 }
}
</code></pre>

<p>I am getting the following error at compilation time:</p>

<p>Student.java:97: reached end of file while parsing
}-></p>

<p>P.S: 97th line is the last line of the program</p>

<p><strong>Can somebody help me to solve this error??</strong></p>
