你好!
File file1 =new File("1.xml") ;//它会在当前路径下找1.xml
相对路径、绝对路径都可以。在一个包直接写文件名就可以。绝对路径写 /包名/文件名
File file = new File("1.xml")//这里采用相对路径