Eclipse-补偿问题

问题描述

因此,我正在尝试在Eclipse上构建电子邮件Admini应用程序,但是存在一个问题 有。控制台显示:

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;

公共类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);
    }
}

为什么我会搞砸我的应用程序?

解决方法

问题出在main方法Email em1 = new email("Goanar","Rambang");中,其中new email("Goanar","Rambang");应该是new Email("Goanar","Rambang");

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...