Welcome to Java4u

A Single Place for all Java Resources

Looking for something?

Subscribe to this blog!

Receive the latest posts by email.

.Just enter your email below if you want to subscribe!


Monday, September 13, 2010

Introduction to Java Language

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.

Download jdk1.6 from java.sun.com/javase/downloads/index.jsp. Double click on jdk1.6 and install java. Set path to c:\program files\java\jdk1.6\bin;

Java Directory Structure
Directory Structure
(The name may be different, for example, jdk5.0)
The compiler and tools
Look here for demos
Library documentation in HTML format (after expansion of j2sdkversion-doc.zip)
Files for compiling native methods (see Volume 2)
Java runtime environment files
Library files
The library source (after expanding src.zip)