import java.io.*;
class e14
{
public static void main(String[] args) throws Exception
{
File f=new File("therelines.txt");
BufferedReader br=
new BufferedReader(
new InputStreamReader(
new FileIntputStream("therelines.txt")));
String line;
line=br.readLine();
System.out.println(line);
}
}
我的therelines.txt文件要放在哪儿?
总是提示找不到符号
class e14
{
public static void main(String[] args) throws Exception
{
File f=new File("therelines.txt");
BufferedReader br=
new BufferedReader(
new InputStreamReader(
new FileIntputStream("therelines.txt")));
String line;
line=br.readLine();
System.out.println(line);
}
}
我的therelines.txt文件要放在哪儿?
总是提示找不到符号
你这么写的话therelines.txt应该和生成的.class文件同级目录
文件放在项目的根目录,比如你的项目为test,则放在test文件夹里面就可以,用eclipse非常方便的
更谢谢chenyifei 太粗心了我
写错了Input
我用的是txt 所以很容易出错的好像