请问线上 网页版的JAVA编辑器
在:https://www.tutorialspoint.com/compile_java_online.php
在:https://www.jdoodle.com/online-java-compiler/
在:https://ideone.com/
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Test{
int a;
}
class Ideone
{
public static void main (String[] args) throws java.lang.Exception
{
Test test = new Test();
}
}
Main.java:9: error: class Test is public, should be declared in a file named
Test.java
public class Test{
^
1 error
宣告类别怎么都不能成功编译成功呢?