Dear Members
I am having a problem in Java and I am pasting the code and the error message please tell me where is the problem and aslo tell me any directory that can guide me about frequent error messages and their solutions. here is the code.
import javax.swing.*;
import java.util.*;
public class PersonInfo{
String name;
String address;
String phoneNo;
String emailAddress;
String fatherName;
public PersonInfo(String n, String ad, String pn, String eml, String fn)
{
name=n;
address=ad;
phoneNo=pn;
emailAddress=eml;
fatherName=fn;
}
ArrayList person=new ArrayList();
public void print()
{
JOptionPane.showMessageDialog(null," Name "+name+" Address "+address+"Phone Number "+phoneNo+" Email Address "+emailAddress+"Father Name "+fatherName);
}
public void addPerson()
{
String nm=JOptionPane.showInputDialog("Please enter the name");
String add=JOptionPane.showInputDialog("Please enter the address");
String pno=JOptionPane.showInputDialog("Please enter the phone number");
String em=JOptionPane.showInputDialog("Please enter the email address");
String fth=JOptionPane.showInputDialog("Please enter the father name");
PersonInfo p=new PersonInfo(nm,add,pno,em,fth);
person.add(p);
}
}
ERROR:
PersonInfo.java uses unchecked or unsafe operations.
Recompile with Xlint:unchecked for details.