![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JAVA
码农邦
想造机器人的傻邦邦
展开
-
JAVA获取程序/jar包所在路径
public class path{ public static void main(String []args){ //输出本程序/jar包所在路径 System.out.println(System.getProperty("user.dir")); } }原创 2020-12-29 00:43:17 · 1132 阅读 · 0 评论 -
JAVA追加写文件方法
import java.io.*; public class ReadFile{ public static void main(String []args)throws IOException{ /* *Linux 系统分隔符为:/ *Window 系统分割符为:\\ */ //写文件 File file2 = new File("C:\\write.txt"); if(!file2.exists()){fil.原创 2020-12-29 00:39:09 · 430 阅读 · 0 评论 -
JAVA读写文件模板
import java.io.*; public class ReadFile{ public static void main(String []args)throws IOException{ /* *Linux 系统分隔符为:/ *Window 系统分割符为:\\ */ //读文件 File file1 = new File("C:\\read.txt"); FileReader reader = new .原创 2020-12-29 00:36:17 · 278 阅读 · 0 评论