【发布时间】:2020-08-22 23:29:46
【问题描述】:
所以我正在尝试在 Eclipse 上构建一个电子邮件管理应用程序,但是我遇到了一个问题 有。控制台说:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
email cannot be resolved to a type
at emailapp.EmailApp.main(EmailApp.java:6)
这是我已经在我的 2 个课程中编写的代码:
打包电子邮件应用程序;
公共类 EmailApp {
public static void main(String[] args) {
Email em1 = new email("Goanar","Rambang");
}
}
public class Email {
private String firstName;
private String lastName;
private String password;
private String department;
private int mailboxCapacity;
private String alternateEmail;
//The Blueprint - Template
// Add constructor for first and last name
// Ask for department]
// Generate random password
// Set mailbox capacity
// Set the alternate email
// Change the password
//Constructor*/
public Email(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
System.out.println("EMAIL CREATED " + this.firstName + "" + this.lastName);
}
}
我可能会搞砸我的应用程序的任何原因?
【问题讨论】:
标签: java string eclipse int this