**Installing Java and Netbeans:**View as a webpage or as a pdf document.**Hello World**: A first Java program.- View this portion of the tutorial as a webpage or as a pdf document.
- Source code: HelloWorld.java.

**Math Examples**: Learn how to do basic mathematics in java. Learn about`if`

statements and*loops*. Learn some more about classes and methods.- View this portion of the tutorial as a webpage or as a pdf document.
- Source code: Factorial.java, Exp.java, BigFactorial.java.
- Download a zip file containing the whole project: MathExamples.zip.
- An Exercise: in the future will include more sample code.

**Complex Numbers**: Learn about classes which can be instantiated as an object through the example of complex numbers.- View this portion of the tutorial as a webpage or as a pdf document.
- Source code: Complex.java, ComplexDemo.java, ByReference.java.
- Download a zip file containing the whole project: ComplexProject.zip.
- An Exercise: in the future will include more sample code.

**Steps to create a graphical mathematics java program**: View this portion of the tutorial as a webpage.**Fractal Curves**: We will illustrate Java by creating a program which creates fractal curves. This is a big project, so we will do it in multiple parts.**The Construction:**In this part, we describe the method we use to construct these fractal curves. We will create the Java classes which carry out these constructions. We will explain some of relationships possible between classes.- View this portion of the tutorial as a webpage.
- View or download the source code. You can also view the source code in order of file creation.

**Drawing Curves**: We describe how to create a graphical program which draws the curves.- View this portion of the tutorial as a webpage.
- View or download the source code.
- Use Java Web Start to launch the Drawing Demo, the Koch Snowflake Display, or another version of the Koch Snowflake Display including a menu bar.

**Mouse interaction**: We describe how to make a graphical program handle the user's mouse clicks and drags.- View this portion of the tutorial as a webpage.
- View or download the source code.
- Use Java Web Start to launch the Interaction Demo or the Fractal Curve Manipulator.

**Some Polishing**: A more polished version of the fractal path program.- View or download the source code.
- Use Java Web Start to launch the Fractal Curve Manipulator (polished).

**Deploying a program with Java WebStart:**: View this portion of the tutorial as a webpage.

- Oracle's Java Tutorial.
- The Java API: You should try to get comfortable with this as quickly as possible.
- FreeHEP VectorGraphics: I use this to output graphics from java.

- The booksite for the textbook "Introduction to Programming in Java" by Robert Sedgewick and Kevin Wayne contains many pieces of mathematics oriented sample code. See their list of programs.
- David Austin's Introduction to Java (for math grad students): David Austin has introduced Java programming at various Mathematical Graphics Summer Schools. I attended one of these schools in 2003.
- Rich Schwartz's Java Applets: These applets progress in difficulty from very basic applets to very complex. The early ones are especially useful in learning what can be done with java. Source code is provided.

- Math oriented parts of the Java API:
- java.lang.Math: This class contains functions which do very basic mathematical operations, such as compute
`sin(x)`

- Oracle's tutorial discussing primitive types.
- java.math.BigInteger: Integers of arbitrarily large size.
- java.math.BigDecimal: Decimal numbers of a arbitrary precision.
- Helper classes for primitive types:
- java.lang.Double: for primitive type double.
- java.lang.Integer: for primitive type int.

- java.lang.Math: This class contains functions which do very basic mathematical operations, such as compute

Support for this work was provided by N.S.F. Grant DMS-1101233 and a PSC-CUNY Award (funded by The Professional Staff Congress and The City University of New York).

© 2013 by W. Patrick Hooper.

This work is licensed under a Licensed under a Creative Commons Attribution 3.0 Unported License.

HOOPER >>>>> JAVA TUTORIAL