当前位置:网站首页>Use of file class
Use of file class
2022-07-03 07:21:00 【four thousand three hundred and forty-three】

Common constructors :


package File;
import org.junit.Test;
import java.io.File;
public class FileTest {
@Test
public void test1(){
// How to create File Class : Constructor one :
// Relative to current module
// ( Relative paths ) Compared with a certain path
File file1 = new File("hello.txt");
// ( Absolute path ) The path to the file or file directory that contains the drive letter
File file2 = new File("D:\\java project\\day07\\he.txt");
}
@Test
public void test2(){
// Constructors 2:
File file3 = new File("D:\\java project","day07");
// Constructors 3:
File file4 = new File(file3,"hi.txt");
}
}
边栏推荐
- [cmake] cmake link SQLite Library
- Use the jvisualvm tool ----- tocmat to start JMX monitoring
- Visit Google homepage to display this page, which cannot be displayed
- Arduino 软串口通信 的几点体会
- Crontab scheduled task
- Download address collection of various versions of devaexpress
- Summary of abnormal mechanism of interview
- [solved] unknown error 1146
- The underlying mechanism of advertising on websites
- 4EVERLAND:IPFS 上的 Web3 开发者中心,部署了超过 30,000 个 Dapp!
猜你喜欢

Hash table, generic

4279. 笛卡尔树

《指环王:力量之戒》新剧照 力量之戒铸造者亮相
![[Fiddler problem] solve the problem about Fiddler's packet capturing. After the mobile network is configured with an agent, it cannot access the Internet](/img/9d/42dfef67246740f0dba0c6d8f1b625.jpg)
[Fiddler problem] solve the problem about Fiddler's packet capturing. After the mobile network is configured with an agent, it cannot access the Internet

Le Seigneur des anneaux: l'anneau du pouvoir

Arduino Serial系列函数 有关print read 的总结

Pits encountered in the use of El checkbox group

Recursion, Fibonacci sequence

Docker builds MySQL: the specified path of version 5.7 cannot be mounted.

专题 | 同步 异步
随机推荐
PAT甲级真题1166
4279. Cartesian tree
Laravel frame step pit (I)
萬卷書 - 價值投資者指南 [The Education of a Value Investor]
10 000 volumes - Guide de l'investisseur en valeur [l'éducation d'un investisseur en valeur]
Common APIs
高并发内存池
Flask Foundation
Discussion on some problems of array
Book recommendation~
php artisan
Use the jvisualvm tool ----- tocmat to start JMX monitoring
Take you through the whole process and comprehensively understand the software accidents that belong to testing
The education of a value investor
Homology policy / cross domain and cross domain solutions /web security attacks CSRF and XSS
691. Cube IV
[most detailed] latest and complete redis interview book (50)
Win 2008 R2 crashed at the final installation stage
Wireshark software usage
SharePoint modification usage analysis report is more than 30 days