Java Example Program
The following two web pages are important. They contain
nearly all of the information a java programmer might need
about the various java library classes.
Compiling and running a java program
- To create a java program, you must have the name of the
class in the file to be the same as the name of the file.
- To compile the program use the command javac as in:
javac HelloWorld.java
This will take the source code in the file HelloWorld.java
and create the Java ByteCode in a file HelloWorld.class.
- To run the compiled program use the command java as in:
java HelloWorld
Note that you do not use the any file extension in this command.
Here is a list of Java Example Programs
Exception examples in Java
Array usage in Java
Class Usage in Java
On Going Help and Assistance
Contact the UIC Student Chapter of the ACM
for additional help. The ACM Office is in 1309 SEO and you can set up
some tutoring by sending email to
tutor@acm.cs.uic.edu or by going to the
ACM Tutoring Web Page