ii m getting error message "class ,interface or enum expected.can anybody help me please thanks.."
import javax.swing.*;
import java.util.*;
public class StudentBook
{
ArrayList students;
public StudentBook()
{
students=new ArrayList();
}
public void addStudent()
{
String name=JOptionPane.showInputDialog("Enter the name of the Student");
String rNum=JOptionPane.showInputDialog("Enter the Roll Number of the Student");
String pNum=JOptionPane.showInputDialog("Enter the Phone Number of the Student");
String stProgram=JOptionPane.showInputDialog("Enter the name of the Study Program");
String stStatus=JOptionPane.showInputDialog("Enter the Status of the Student");
StudentInfo s=new StudentInfo(name,rNum,pNum,stProgram,stStatus);
students.add(s);
}
public void searchStudent(String r)
{
for(int i=0;i<students.size();i++)
{
StudentInfo s=(StudentInfo)students.get(i);
if(r.equals(s.rollNum))
{
s.print();
}
else
{
JOptionPane.showMessageDialog("Student not found for Roll Number" + r);
}
}
}
//to delete the Student
public void deleteStudent(String r)
{
for(int i=0;i<students.size();i++)
{
StudentInfo s=(StudentInfo)students.get(i);
if(r.equals(s.rollNum))
{
s.remove(i);
}
else
{
JOptionPane.showMessageDialog("Student not found for deletion having roll number" +
r);
}
}
}
}
}