請問線上 網頁版的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
宣告類別怎麼都不能成功編譯成功呢?