當我嘗試編譯我的代碼,我得到的錯誤:找不到符號?
1 error found:
File: C:\Users\Matthew\Documents\engr 103\cpu.java [line: 13]
Error: C:\Users\Matthew\Documents\engr 103\cpu.java:13: cannot find symbol
symbol : class BufferReader
location: class cpu
我一直想立即解決這一段時間,但它已經有一段時間,因爲我使用的Java,我不知道該怎麼辦。
import java.io.*;
import java.util.Scanner;
class cpu{
public static void main(String []args) throws Exception
{
Runtime r =Runtime.getRuntime();
String f,temp,res="";
int i=0,j=0;
f="sensors";
Process p=r.exec(f);
BufferedReader pin=new BufferReader(new InputStreamReader(p.getInputStream()));
while((temp=pin.readLine())!=null)
{
System.out.println(temp);
}
}
}
重複的:http://stackoverflow.com/ question/25706216/what-do-a-can-find-symbol-compilation-error-mean – 2017-04-02 13:19:49