Skip to content

Commit e6556c2

Browse files
authored
Update tutorial_50.md
1 parent 2355bf6 commit e6556c2

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

code/tutorial_50/tutorial_50.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# Packages
22

33
#### What / Why?
4-
> A package is a group of class files.
5-
6-
7-
> Packages help organize your code.
8-
9-
10-
> 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.
4+
* A package is a group of class files.
5+
* Packages help organize your code.
6+
* 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.
117

128

139
#### Naming conventions
@@ -17,7 +13,7 @@ package com.site.packagename;
1713
package net.site.packagename;
1814
package org.site.packagename;
1915

20-
// using your initials or company name
16+
// using your initials and/or company name
2117
package jre.packagename
2218
package jre.companyname.packagename;
2319
```
@@ -53,29 +49,34 @@ javac -d ./ ./source1/*.java ./source2/*.java
5349
```
5450

5551
#### Running classes within packages
56-
>If in different directory.
52+
>If in different directory.
53+
5754
```
5855
java -cp c:\location\of\packages full.packagename.ClassName
5956
```
6057

61-
>If in the package directory.
58+
>If in the package directory.
59+
6260
```
6361
java full.packagename.ClassName
6462
```
6563

6664
#### Windows trick to get a list of all your projects java files
67-
> c:/location/of/source/files/update-sources.cmd
65+
> c:/location/of/source/files/update-sources.cmd
66+
6867
```
6968
dir /s /b *.java > sources.txt
7069
```
7170

7271
#### Using our `sources.txt` file
73-
>Compiles all your java files to the current directory.
72+
>Compiles all your java files to the current directory.
73+
7474
```
7575
javac -d ./ @sources.txt
7676
```
7777

78-
>Compiles all your java files to a folder called bin, in the current directory.
78+
>Compiles all your java files to a folder called bin, in the current directory.
79+
7980
```
8081
javac -d ./bin @sources.txt
8182
```

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy