--------------------Configuration: j2sdk1.5.0 <Default>--------------------
D:\JCreator Pro\MyProjects\ButtonDemo\ButtonDemo\ButtonDemo\test.java:8: cannot find symbol
symbol  : method ReadLine()
location: class java.io.File
System.out.println(Ran.ReadLine());
                                      ^
D:\JCreator Pro\MyProjects\ButtonDemo\ButtonDemo\ButtonDemo\test.java:8: internal error; cannot instantiate println(boolean) at java.io.PrintStream to (java.io.File.ReadLine)
System.out.println(Ran.ReadLine());
                          ^
2 errorsProcess completed.

解决方案 »

  1.   

    给你这个程序参考一下就知道哪儿的问题了
    import java.io.*;public class FileReadTest {
    public static void main (String[] args) {
    FileReadTest t = new FileReadTest();
    t.readMyFile();
    }void readMyFile() {
    String record = null;
    int recCount = 0;
    try {
      File readfile = new File("F:\\个人资料\\address.txt");
    FileReader fr = new FileReader(readfile);
    BufferedReader br = new BufferedReader(fr);
    record = new String();
    while ((record = br.readLine()) != null) {
    recCount++;
    System.out.println(recCount + ": " + record);
    }
    br.close();
    fr.close();
    } catch (IOException e) {
    System.out.println("Uh oh, got an IOException error!");
    e.printStackTrace();
    }
    }}
      

  2.   

    是不是用的是JCREATOR啊。这个软件出现乱码的原因是输入法的问题
    你可以在控制面板中去调节
      

  3.   

    if reading from characters files, you should use FileReader.
    also buffer is advised.
      

  4.   

    import java.io.*; 
    public class test{ 
    RandomAccessFile Ran; 
    public test()throws IOException{ 
    Ran=new RandomAccessFile ("abc.txt"."r"); 
    System.out.println(Ran.ReadLine()); 

    public static void main(String args[]){ 
    try{ 
    new test(); 

    catch(IOException e){ 



    不好意思 我程序发错了 大家在看一下
      

  5.   

    小弟刚用JCREATOR,如何在控制面板中配置输入法啊?