小编Con*_*man的帖子

错误:无法在intelliJ IDE中找到或加载主类

我是Java的初学者,我正在尝试使用IntelliJ运行我的代码,我刚刚安装了JDJ 1.7作为我的IDE.以下代码保持甚至不编译并继续给我错误:

Error: Could not find or load main class libTest
Run Code Online (Sandbox Code Playgroud)

import java.lang.Integer;
import java.lang.String;
import java.lang.System;
import java.util.*;

class book {

    private String name = "trial";
    private int bookCode=1;
    private int issued=0;

     public void Issue(){
         if(issued==0) {
             issued=1;
             System.out.println("You have succesfully issued the book");
         }
         else {
             System.out.println("The book is already issued. Please contact the librarian for further details");
         }
    }

    public int checkCode() {
        return bookCode;
    }

    String readName() {
        return name;
    }

    public void setName(String newName){ …
Run Code Online (Sandbox Code Playgroud)

java compiler-errors intellij-idea

114
推荐指数
14
解决办法
18万
查看次数

标签 统计

compiler-errors ×1

intellij-idea ×1

java ×1