我是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)