반응형
Summary of Creating and Using Packages
To create a package for a type, put a package
statement as the first statement in the source file that contains the type (class, interface, enumeration, or annotation type).
To use a public type that's in a different package, you have three choices: (1) use the fully qualified name of the type, (2) import the type, or (3) import the entire package of which the type is a member.
The path names for a package's source and class files mirror the name of the package.
You might have to set your CLASSPATH
so that the compiler and the JVM can find the .class
files for your types.
반응형
'Java 배우기' 카테고리의 다른 글
Learning the Java Language: End of Trail 자바언어 배우기: 트레일의 끝 (0) | 2016.01.24 |
---|---|
Questions and Exercises: Creating and Using Packages (0) | 2016.01.24 |
Managing Source and Class Files 소스 및 클래스 파일 관리하기 (0) | 2016.01.24 |
Using Package Members (0) | 2016.01.24 |
Naming a Package 패키지 이름짓기 (0) | 2016.01.24 |
댓글