import java.util.*;
public class Test {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int x, y, sum;
Scanner input = new input(system.in);
input = parseInt32();
}
}
這裏是個例外:如何在Java中兩個數相加編程
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
input cannot be resolved to a type
input cannot be resolved to a type
system cannot be resolved to a variable
The method parseInt32() is undefined for the type Test
at Test.main(Test.java:12)
你在哪裏定義一個名爲parseInt32()方法? – Rami
您試圖運行無法編譯的代碼。永遠不要這樣做。修正編譯器在嘗試運行之前抱怨的編譯錯誤。 –
'int value = 1 + 1' – Craig