阅读下列异常处理的代码,( )是错误的?
A.try(Doctor d = new Doctor()) {}catch(Exception e){}
B.try (FileInputStream is = new FileInputStream("A、txt")){}catch(Exception e){}
C.try(Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root","111")){}catch(Exception e){}
D.try( Connection connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "111"); Statement stmt = connection.createStatement(); ){}catch(Exception e){}
正确答案是A