CED Solutions Home
Search classes by keyword:
Search classes by category:
computer training atlanta
birmingham, alabama


Microsoft Gold Partner, Microsoft Office Specialist, Cisco Partner, CompTIA Gold Partner, SCP Partner, EC-Council Training, ISC Provider, Novell Gold Training Partner, CIW Partner, Prometric Training Center, Pearson Vue Test Center, Measure Up Training


Java | Java Classes | Java FAQ | Java Exam Info

Java Programming FAQ

Java FAQ: Table of Contents

What is Java?
Where did Java come from?
Doesn't the World Wide Web have something to do with this?
Do I need to know C++ to learn Java?
Where does Javascript fit in?
What's the difference between an application and an applet?


What is Java?

Java, formerly known as oak, is an object-oriented programming language developed by Sun. It shares many superficial similarities with C, C++, and Objective C (for instance for loops have the same syntax in all four languages); but it is not based on any of those languages, nor have efforts been made to make it compatible with them.

Java is sometimes referred to as C++ ++ --. The language was originally created because C++ proved inadequate for certain tasks. Since the designers were not burdened with compatibility with existing languages, they were able to learn from the experience and mistakes of previous object-oriented languages. They added a few things C++ doesn't have like garbage collection and multithreading; and they threw away C++ features that had proven to be better in theory than in practice like multiple inheritance and operator overloading. (There's still argument over whether they made the right choices.

Even more importantly, Java was designed from the ground up to allow for secure execution of code across a network, even when the source of that code was untrusted and possibly malicious. This required the elimination of more features of C and C++. Most notably there are no pointers in Java. Java programs cannot (at least in theory) access arbitrary addresses in memory.

Furthermore Java was designed not only to be cross-platform in source form like C, but also in compiled binary form. Since this is frankly impossible across processor architectures, Java is compiled to an intermediate byte-code which is interpreted on the fly by the Java interpreter. Thus to port Java programs to a new platform all that is needed is a port of the interpreter and a few native code libraries.

Finally Java was designed to make it a lot easier to write bug free code. Shipping C code has, on average, one bug per 55 lines of code. About half of these bugs are related to memory allocation and deallocation. Thus Java has a number of features to make bugs less common:

  • Strong Typing
  • No unsafe constructs
  • The language is small so its easy to become fluent.
  • The language is easy to read and write. Obfuscated Java isn't nearly as common as obfuscated C.
  • There are no undefined or architecture dependent constructs.
  • Java is object oriented so reuse is easy.
  • Java has concurrency.

[ Back to top ]

Where did Java come from?

In the late 1970's Bill Joy thought about doing a language that would merge the best features of MESA and C. However other projects (like cofounding Sun) intervened. In the late 1980's he got Sun's engineers started on a complete revision of the UNIX operating system that involved merging SunOS4.x with AT&T's SYSVR4.

In 1989 Joy sold his Sun stock, invested heavily in Microsoft and moved out of mainstream Sun to Aspen, Colorado. By the early 90's Bill was getting tired of huge programs. He decided that he wanted to be able to write a 10,000 line program that made a difference. In late 1990 Bill wrote a paper called Further which outlined his pitch to Sun engineers that they should produce an object environment based on C++. Today Joy freely admits that C++ was too complicated and wasn't up to the job.

Around this time James Gosling (of emacs fame) had been working for several months on an SGML editor called "Imagination" using C++. The Oak language (now Java) grew out of Gosling's frustration with C++ on his "Imagination" project.

Patrick Naughton, then of Sun, now vice-president of technology at StarWave, started the Green Project on December 5th, 1990. Naughton defined the project as an effort to "do fewer things better". That December he recruited Gosling and Mike Sheridan to help start the project. Joy showed them his Further paper, and work began on graphics and user interface issues for several months in C.

In April of 1991 the Green Project (Naughton, Gosling and Sheridan) settled on smart consumer electronics as the delivery platform, and Gosling started working in earnest on Oak. Gosling wrote the original compiler in C; and Naughton, Gosling and Sheridan wrote the runtime-interpreter, also in C. Oak was running its first programs in August of 1991. Joy got his first demos of the system that winter, when Gosling and Naughton went skiing at Joy's place in Aspen.

By the fall of 1992 "*7", a cross between a PDA and a remote control, was ready This was demoed to Scott McNealy, Sun's president, in October. He was blown away. Following that the Green Project was set up as First Person Inc., a wholly owned Sun subsidiary.

In early 1993 the Green team heard about a Time-Warner request for proposal for a settop box operating system. First Person quickly shifted focus from smart consumer electronics (which was proving to be more hype than reality) to the set-top box OS market, and placed a bid with Time-Warner.

Fortuitously, Sun lost the bid. The Time-Warner project went nowhere, the same place it probably would have gone if Sun had won the bid. First Person continued work on settop boxes until early 1994, when it concluded that like smart consumer electronics settop boxes were more hype than reality.

Without a market to be seen First Person was rolled back into Sun in 1994. However around this time it was realized that the requirements for smart consumer electronics and settop box software (small, platform independent secure reliable code) were the same requirements for the nascent web.

For a third time the project was redirected, this time at the web. A prototype browser called WebRunner was written by Patrick Naughton in one weekend of inspired hacking. After additional work by Naughton and Jonathan Payne this browser became HotJava. The rest, as they say, is history.

Information in this section is primarily based on the first hand accounts of Bill Joy and Patrick Naughton (which don't always agree). No doubt other people have still different memories of what occurred. If you've got any more first hand information about what went on in the Green project I'd like to hear from you.

[ Back to top ]

Doesn't the World Wide Web have something to do with this?

Not necessarily. Java is a programming language. When work began on what has become Java, the World Wide Web was just getting started at CERN; and Mosaic wasn't even a glint in Marc Andreesen's eye. The original use of the Java language (settop boxes) required security and the ability to execute code from untrusted hosts. It turns out these are virtually the same requirements for allowing people to download and run programs from the Web. No other language has the built-in security of Java. The key here is the security features. The object-oriented nature of Java is secondary, and mainly reflects the preferences and prejudices of the developers who set out to write a secure language. The C-like syntax of the language is even less crucial.

At the lowest level the advantage of Java to the web is that it provides a secure, cross-platform way for code to be executed. At a somewhat higher level Java adds several features to existing web sites:

Arbitrary Graphics

Java lets the server draw pictures in a window on the client. In theory this allows a web page to do anything a regular program can do by drawing in a window.

Arbitrary Data Types

In practice rather than using graphics primitives to create your desired web page you'd use a graphics program to draw the page and then write a program that could read and display the file formats of that program. Java lets you write content handlers that display any particular data format. This way you can download your data and your data display program rather than downloading a bitmapped snapshot of the display. People are already using this to add sound and animation to web pages. Rather than having to download a file and spawn an external viewer, the viewer is included with the data; and the data is displayed right on the page.

Less Load On The Server

CPU intensive cgi-bin scripts place a large load on a server, particularly at busy sites. With Java you can off-load the calculations to the client's PC.

More User Interaction

Finally Java allows for more interaction with the user. Java not only allows you to paint arbitrary data on the screen. It also allows you to collect input from the user in the form of mouse clicks, keystrokes and the like. This lets you put almost any application on your web page that doesn't require disk access.

[ Back to top ]

Do I need to know C++ to learn Java?

No. Java is in fact a much easier language to learn than C++.

[ Back to top ]

Where does Javascript fit in?

To quote from p. 31 of the book, The Java Developer's Resource, Java and JavaScript are about as closely related as the Trump Taj Mahal in Atlantic City is to the Taj Mahal in India. In other words, Java and JavaScript both have the word Java in their names, and that's about it. JavaScript is a programming language from Netscape which is incorporated in their browsers. It is superficially similar to Java in the same way C is similar to Java but differs in all important respects.

[ Back to top ]

What's the difference between an application and an applet?

This question can be answered on many levels. Technically an application is a Java class that has a main() method. An applet is a Java class which extends java.applet.Applet. A class which extends java.applet.Applet and also has a main() method is both an application and an applet.

More generally and less technically, an application is a stand-alone program, normally launched from the command line, and which has more or less unrestricted access to the host system. An applet is a program which is run in the context of an applet viewer or web browser, and which has strictly limited access to the host system. For instance an applet can normally not read or write files on the host system whereas an application normally can.

[ Back to top ]



Home | Technical Schedule | Application Classes | Class Outlines | MCSE, MCDBA, MCSD Training | Microsoft .NET Programming | Cisco Classes | Linux, Unix, AIX | CompTIA Certification | Webmaster Training | Pricing | Locations | Financing | E-mail Us





Search classes by keyword:
Search classes by category:


computer training atlanta MCSE Atlanta MCSE Georgia MCSE classes MCSE Birmingham MCSE Training MCSE training Atlanta MCSE classes Atlanta MCSE classes Birmingham MCSE classes Alabama Dreamweaver Atlanta Dreamweaver training Atlanta ColdFusion training ColdFusion training Atlanta project training atlanta ColdFusion classes Atlanta ColdFusion classes Georgia Flash training Georgia Flash training Atlanta MCSE boot camps MCSE certification training computer room rentals computer room rentals atlanta computer room rentals birmingham computer training georgia computer training alabama computer training birmingham Crystal Reports training Crystal Reports training atlanta Crystal Reports classes Crystal Reports classes Atlanta Crystal Reports 8.0 training