General notes about Java


“When faced with a decision i always ask, what would be the most fun,?”- Peggy Walker
Java is a powerful language. Experienced programmers sometimes take pride in being able to create some wood

weird , contorted ,convoluted usage of a language. This is poor programming practice. It makes programs more difficult to read

, more likely to behave strangely, more difficult to test and debug and more difficult to adapt to changing requirements. Thesechapters are also geared for novice programmers, so we stress clarity.

 The following is our first Java “Good programming practice”:


 Good programming practice: Write your Java programs in a simple and straightforward manner. This is sometimes referred as KIS.(keep it simple. Do not stress the language by trying bizarre usages.


  A simple way to make money. simply send traffic to this website and earn some money every time someone clicks on it! You could earn $1 for every click!



You heard that Java is a portable language, and that programs written in Java can run on many different computers. Portability is an elusive goal. The ANSI C standard document contains a lengthy list of

 portability issues, and complete books have been written that discuss portability.


 Portability tip:

 Although it is easier to write portable programs in Java than in most other portable languages, there are differences among compilers ,interpreters and computers that can make

 portability difficult to achieve. Simply writing programs in Java does not guarantee portability. The programmer would occasionally need to deal directly with compiler and computer variations.


 Error Prevention tip:

 Always test your Java programs on all systems on which you intend to run those programs.


 We have done a careful walkthrough of Sun’s Java documentation and audited our presentation against it for completeness and accuracy. However , Java is a rich language, and their are some subtleties in the language

 and some topics we have not covered. if you need additional technical details on Java, we suggest that you read the most current Java documentation available over the internet at


 Good programming practice: Read the documentation for the version of Java you are using. Refer to this documentation frequently to be sure you are aware of the rich collection of Java features and that you are 

 using these features correctly.

 Your computer and compiler are good teachers. If after carefully reading your Java documentation manual you are not sure how a specific feature of Java works, experiment and see what happens. Study each error or warning message you get

 when you compile you programs and correct the programs to eliminate these messages.


  A simple way to make money. simply send traffic to this website and earn some money every time someone clicks on it! You could earn $1 for every click!



 We explain how Java works in the current implementation. Perhaps the most striking problem with the early versions of Java is that Java programs execute interpretively on the clients machine. Interpreters execute slowly compared to fully compiled machine code.


 Performance tip: Interpreters have an advantage over compilers in the java world, namely that an interpreted program can begin execution immediately as soon as it is downloaded to the clients machine, whereas a source program to be compiled must first 

 suffer a potentially long delay as the program is compiled before it is executed.


 Although only Java interpreters were available to execute bytecodes at the clients site on early Java systems, Java compilers have been written for most popular platforms. These compilers take the java bytecodes( or in some cases the java source code) and compiler them into the native machine code

  of the clients machine. These compiled programs perform comparably  to compiled C or C++ code. There are not compilers for every  Java platform, so Java programs will not perform on the same level on all platforms.


  Applets present some more interesting issues. Remember an applet could be coming from virtually any web server in the world. So the applet will have to be able to run on any possible Java platform.

  Short, fast executing Java applets can certainly still be interpreted. But what about more substantial, compute intensive applets. Here the user may be willing the compilation delay to get better execution performance. For some especially performance intensive applets the user may have no choice

   interpreted code would run too slowly for the applet to perform properly, so the applet would have to be compiled.


   An intermediate step between interpreters and compilers is a just-in-time(JIT) compiler that, as the interpreter runs , produces compiled code for the programs and executes the programs  in machine language rather than reinterpreting them. JIT compilers do not

   produce machine language that is as efficient as a full compiler. Full compilers for Java are under development now. For the latest information on high speed Java program translation you want to read about  Sun’s Hotspot compiler, visit 



  A simple way to make money. simply send traffic to this website and earn some money every time someone clicks on it! You could earn $1 for every click!

   For organisations wanting to do heavy-duty information systems development, Integrated Development Environment (IDE) are available from the major software suppliers. The IDE’s provide many tools for supporting the software development process. Several Java IDE’s on the market today are just as powerful

   as those available for C and C++ systems development. This is a strong signal that Java has been accepted as a viable language for developing substantial software systems.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s