when i call the see method in another class by a try-catch statement i m getting the exception message
see method is called by an actionlistener of an JButton...plz help me fix this
public class Check{ private Scanner in; String a, b, c, d, m2; //opening file public void openFile(){ try{ in = new Scanner(new File("couple.txt")); }catch(Exception e){ JOptionPane.showMessageDialog(null,"ERROR 002"); } } //getting data from file public void readFile(){ while(in.hasNext()){ a = in.next(); b = in.next(); c = in.next(); d = in.next(); m2 = in.next(); } } //checking for couple(emailing) OR recording public void see(String cn, String ce, String un, String ue,String m1)throws IOException{ if (b == ce && d == ue) { //we have a coupple email e = new email(); e.Sendmail(ce,un,m1); e.Sendmail(ue,cn,m2); }else{ Record r = new Record(); r.addRecords(cn,ce,un,ue,m1); } } //closing file public void closeFile(){ in.close(); } }