当前位置:网站首页>File file = new file ("test.txt") file path
File file = new file ("test.txt") file path
2022-06-11 03:07:00 【zfoo-framework】
public class TestFile2 {
public static void main(String[] args) throws Exception{
File f = new File("test.txt");
if(!f.exists()){
System.out.println("file not exist");
boolean newFile = f.createNewFile();
}else {
System.out.println("file exist");
}
System.out.println(f.getAbsolutePath());
}
}
Conclusion :
1. Direct operation java, Is under the project path
2,. Package and run jar, And jar Under the same level directory of the package
边栏推荐
- [long time series prediction] aotoformer code detailed [3] model overall architecture analysis
- Go quick start of go language (I): the first go program
- Forest v1.5.22 release! Kotlin support
- Cmake common commands
- TCP/IP
- 近期学习和更新计划
- The two departments jointly issued the nine provisions on fire safety management of off campus training institutions
- Cygwin reports an error child_ info_ fork::abort: XXX. dll: Loaded to different address: parent(XXX) != child(XXX)
- How can Delma's own brand "take off" when Philips is listed on the market?
- VMware虚拟机IP,网关设置。虚拟机ping不通外网
猜你喜欢

TCP/IP

com. mchange. v2.c3p0. Combopooleddatasource red

GraphAcademy 课程讲解:《Neo4j 图数据科学基础》

HUST软件工程(实验2)--TDD测试驱动开发实验。

cv. Houghcircles: Circular Hough transform opencv

Detailed explanation of unity project optimization (continuous supplement)

Wechat applet

Error in Solr access: error initializing queryelevationcomponent

VMware虚拟机IP,网关设置。虚拟机ping不通外网

VMware virtual machine IP, gateway settings. The virtual machine cannot be pinged to the Internet
随机推荐
File file = new File(“test.txt“)文件路径
AOSP ~ logcat chatty line expired
CPT 102_ LEC 18
Blue Bridge Cup_ Xiao Lan eats candy_ Pigeon nest principle / drawer principle
Go language advantages and learning Roadmap
B_ QuRT_ User_ Guide(20)
HUST软件工程(实验2)--TDD测试驱动开发实验。
Cygwin reports an error child_ info_ fork::abort: XXX. dll: Loaded to different address: parent(XXX) != child(XXX)
HQChart实战教程55-欧易网K线面积图
Harris corner detection opencv
cv. Matchtemplate image model matching opencv
Stringutils string tool class used by FreeMarker to create templates
js 内存泄漏
Go语言之Go 快速入门篇(一):第一个 Go 程序
List filtering, sorting, verification and other processing methods
postgresql源码学习(十八)—— MVCC③-创建(获取)快照
org. apache. solr. common. SolrException:Could not load core configuration for core hotel
Pyqt5:qlineedit control code
Flink开发环境搭建及WordCount
Forest v1.5.22 release! Kotlin support