Why do I get the error “File cannot be resolved to a type”?

后端 未结 4 1712
天涯浪人
天涯浪人 2020-12-10 17:26

Here\'s part of my code

try{

    BufferedReader in= new BufferedReader(new InputStreamReader(System.in));

    while ((line= in.readLine())!=\"exit\"){

            


        
4条回答
  •  隐瞒了意图╮
    2020-12-10 18:05

    Chances are you've just missed:

    import java.io.File;
    

    from the top of your source file.

    You could use

     import java.io.*; 
    

    I typically use single-type imports.

提交回复
热议问题