有两个java类都具有main函数.现在我必须首先将第一类对象调用到第二类对象和第二类对象.每当我这样做它就会给出堆栈溢出异常.有没有办法同时称呼这些?
头等舱:
public class ChangePasswordLogin extends javax.swing.JFrame {
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String message = null;
RandomStringGenerator rsg = new RandomStringGenerator();
MD5Generator pass = new MD5Generator();
PopUp popobj = new PopUp();
ForgotPassword fpemail = new ForgotPassword();
Run Code Online (Sandbox Code Playgroud)
二等:
public class ForgotPassword extends javax.swing.JFrame {
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String message = null;
String useremail;
PopUp popobj = new PopUp();
RandomStringGenerator rsg = new RandomStringGenerator();
MD5Generator …Run Code Online (Sandbox Code Playgroud)