Java is an object-oriented programming language with a built-in application programming
interface (API) that can handle graphics and user interfaces and that can be used
to create applications or applets. Because of its rich set of API's, similar to
Macintosh and Windows, and its platform independence, Java can also be thought of
as a platform in itself. Java also has standard libraries for doing mathematics.
Much of the syntax of Java is the same as C and C++. One major difference is that
Java does not have pointers. However, the biggest difference is that you must write
object oriented code in Java. Procedural pieces of code can only be embedded in
objects. In the following we assume that the reader has some familiarity with a
programming language. In particular, some familiarity with the syntax of C/C++ is
useful.
In Java we distinguish between applications, which are programs that perform the
same functions as those written in other programming languages, and applets, which
are programs that can be embedded in a Web page and accessed over the Internet.
Our initial focus will be on writing applications. When a program is compiled, a
byte code is produced that can be read and executed by any platform that can run
Java.
-
Objects
- Constructors
- Private Variables
- Extending a Class
- Named Constants
- Static Methods
- String Type
- Arrays
- Methods and scope
- Simple Graphics
- Loops
- Offscreen Buffer
- User Interaction
- Switch Structure
- Animation
- Threads
- Utility Package
- Control Frame
- Control Menu
- Table
- Plot
- World Graphics
- Syntax Summary
- References
|