java - Eclipse - 比较问题
问题描述
所以我正在尝试在 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);
}
}
为什么我可能会搞砸我的应用程序?
解决方案
The problem is in the main
method, Email em1 = new email("Goanar","Rambang");
where new email("Goanar","Rambang");
should be new Email("Goanar","Rambang");
推荐阅读
- android - 使用自定义通知时如何以编程方式将视图添加到通知(添加到 RemoveViews)
- laravel - 如何从刀片中的 eloquent 过滤器中提取数据
- jquery - 当我们使用数据表 pdf 按钮打印数据表时,无法获取 pdf 格式的数据表图像。它只显示空数据而不是图像
- orbeon - 如何删除重复网格的插入下拉菜单的 Orbeon 表单外观
- java - @OnTimer 在窗口后未触发
- php - 在PHP中按键的字母顺序对多维数组进行排序
- c++ - CopyFile 找不到文件,而我可以从 fopen 打开它
- android - 无法获取 TPL 地图的折线坐标
- python - 里面有 Django 的便携式 python 包?
- tensorflow - 为张量流计算图重塑图像