Java catch IOException

Ich denke, das ist basic stuff, aber ich bin mir nicht sicher, was zu tun ist. Warum bekomme ich IOException never thrown in body of corresponding try statement

public static void main(String[] args)
    {
        File inputFile = null ;

        try
        {
            inputFile = new File("records.txt") ;   
        }
        catch (IOException e)
        {
            System.out.print("file not found!") ;
        }
InformationsquelleAutor | 2011-04-02
Schreibe einen Kommentar