Visit our online store at CafePress for items with the PING 127.0.0.1 Computer Services logo!
Please find below a list links to the source code of simple Java programs and documentation produced by PING 127.0.0.1 Computer Services.
All source code is distributed under the GNU General Public License
-
Java Classes Defined - Short explanation of what Java classes are, with sources from several websites.
-
textfile.java - prints out a text file.
-
Compound9.java - a simple
investment compounding program; the user is prompted for the number of years to invest,
the amount per month to invest and the initial amount invested. It starts with a Swing text
box, so it takes a few seconds to get started. Program takes 20% for taxes.
A text file with the results is written to the directory where the program is run from.
To compile: javac compound9.java.
To run: java compound9.
-
echo2.java - echoes back to the
screen a line that is entered when the program is executed.
-
Rwtest.java - takes a file entered
when the program is run and prints it out to the screen character by character.
Example of reading a file in character by character. To run:
java Rwtest testfile.txt. File that gets read in is the 0th argument in the args[] array.
-
regex1.java - small program
that uses Java regular expressions.
-
HelloDate.java - small program
that creates and calls a static method.
-
Bravo.java - small program
that sets up 2 classes, the second which is extends the first. Calls methods from
both classes.
-
Capital.java - small program
that tests a letter to see if it is a capital or not