File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 11# Packages
22
33#### What / Why?
4- > A package is a group of class files.
4+ > A package is a group of class files.
5+
56
67> Packages help organize your code.
78
9+
810> Packages help keep your code unique from other people so you can resolve conflicts in your code if you have two or more classes with the same name.
911
12+
1013#### Naming conventions
1114``` java
1215// after your website
@@ -21,26 +24,30 @@ package jre.companyname.packagename;
2124
2225#### Compiling packages
2326
24- > Generic.
27+ > Generic.
28+
2529```
2630javac -d c:/path/to/compile/to c:/path/of/source/file.java
2731```
2832
29- > Generic, compile all java files in a directory.
33+ > Generic, compile all java files in a directory.
34+
3035```
3136javac -d c:/path/to/compile/to c:/path/of/source/*.java
3237```
3338
34- > Current directory = './' or simply just '.' so all these are the same.
39+ > Current directory = './' or simply just '.' so all these are the same.
40+
3541```
3642javac -d ./ ./*.java
3743
3844javac -d . ./*.java
3945
4046javac -d . *.java
41- ```
47+ ```
48+
49+ > Compiling from two sources.
4250
43- > Compiling from two sources.
4451```
4552javac -d ./ ./source1/*.java ./source2/*.java
4653```
You can’t perform that action at this time.
0 commit comments