Path file=new File("D:/code/img.png").toPath();
请问怎么解决的
需要引入一个io 类
你得在D盘创建一个code文件夹,然后导入才能够用Path语句
补充:
错误的提示是:Path cannot be resolved to a type //Path cannot be resolved to a type