-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPathDemo1.java
More file actions
44 lines (37 loc) · 903 Bytes
/
PathDemo1.java
File metadata and controls
44 lines (37 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collection;
import java.util.concurrent.locks.Lock;
/**
* Created by hwb on 2015/12/14.
*/
public class PathDemo1<T>
{
// public static void main(String[] args)
// {
//
// int a = 10;
// {
// a = 21;
// System.out.println(a);
// }
//
// System.out.println(a);
// }
Lock
public static void main(String[] args)
{
Path path = Paths.get("d:/test/1.txt");
System.out.println(path.getFileName());
System.out.println(path.getFileSystem());
System.out.println(path.getRoot());
System.out.println(path.getParent());
System.out.println(path.getNameCount());
System.out.println(path.getName(0));
}
@SafeVarargs
public final <T> Collection<T> merge(T... args)
{
return null;
}
}