当前位置:网站首页>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");
}
}
边栏推荐
- [HCAI] learning summary OSI model
- Distributed lock
- When MySQL inserts Chinese into the database, there is a diamond question mark garbled code
- MySQL mistakenly deleted the root account and failed to log in
- gstreamer ffmpeg avdec解码数据流向分析
- The underlying mechanism of advertising on websites
- C WinForm framework
- 带你全流程,全方位的了解属于测试的软件事故
- [vscode - vehicle plug-in reports an error] cannot find module 'xxx' or its corresponding type declarations Vetur(2307)
- [most detailed] latest and complete redis interview book (50)
猜你喜欢

Setting up the development environment of dataworks custom function

Deep learning parameter initialization (I) Xavier initialization with code
![PdfWriter. GetInstance throws system Nullreferenceexception [en] pdfwriter GetInstance throws System. NullRef](/img/65/1f28071fc15e76abb37f1b128e1d90.jpg)
PdfWriter. GetInstance throws system Nullreferenceexception [en] pdfwriter GetInstance throws System. NullRef

Pits encountered in the use of El checkbox group

Docker builds MySQL: the specified path of version 5.7 cannot be mounted.
![[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

691. Cube IV

Dora (discover offer request recognition) process of obtaining IP address

Inno Setup 制作安装包

dataworks自定義函數開發環境搭建
随机推荐
【无标题】
[set theory] equivalence classes (concept of equivalence classes | examples of equivalence classes | properties of equivalence classes | quotient sets | examples of quotient sets)*
Operation and maintenance technical support personnel have hardware maintenance experience in Hong Kong
Jeecg request URL signature
Distributed ID
[HCAI] learning summary OSI model
MySQL syntax (basic)
Shim and Polyfill in [concept collection]
【已解决】win10找不到本地组策略编辑器解决方法
sharepoint 2007 versions
[attribute comparison] defer and async
POI excel percentage
[untitled]
Basic knowledge about SQL database
Laravel frame step pit (I)
[solved] sqlexception: invalid value for getint() - 'Tian Peng‘
Arduino 软串口通信 的几点体会
"Moss ma not found" solution
Laravel Web Framework
Interview questions about producers and consumers (important)