Java

**  By Justin Kwon Java is a programming language that was developed by the Sun Microsystems and was released in 1995. James Gosling initiated the Java Language Project in June 1991 for the use of one of his set-top box projects. It was originally called Oak (from an oak tree that stood outside his window) but later changed to Java (picked it from a random list of words). It derived from C and C ++ and had a simple model concept and fewer low-level facilities. Sun made most of their technologies as free software under the GNU (General Public License). Sun Microsystems officially licensed the Java Standard Edition platform for Microsoft Window, Linux, and Solaris. They can also be available through third party vendors and licenses. Java is used all over the world and is a leading programming language for many companies.
 * Java
 * Basic History**


 * General Concept**

Five Goals of Java It promised to “Write Once, Run Anywhere” (WORA), which provided no-cost run-times on any popular platforms. Java was a platform independence, which meant that programs written in the Java language was able to run on any hardware or any computer. That’s where the slogan “Write Once, Run Anywhere” derived from. To achieve this goal was to compel the Java language code, not to machine code but to Java bytecode. A major bonus to the bytecode was its portability. Java also uses an automatic garbage collector to manage its memory. The programmer would determine when objects are created, and Java runtime would recover the memory that is no longer in use. When there are no reference to an object remains, the unreachable object becomes eligible to be freed automatically by the garbage collector. Memory leaks can occur if the programmer’s code holds a reference to an object that is no longer needed. Java uses a graphical user interface library called Swing. JavaServer Pages are server-side Java EE components that respond to HTML pages. Java Syntax is generally derived from the C++ program and uses similar features but certain suffix has to be compiled into bytecode using a Java complier.
 * 1) It should use the [|object-oriented programming] methodology.
 * 2) It should allow the same program to be [|executed] on multiple [|operating systems].
 * 3) It should contain built-in support for using [|computer networks].
 * 4) It should be designed to execute code from [|remote sources] securely.
 * 5) It should be easy to use by selecting what were considered the good parts of other object-oriented languages. (Copied from Wikipedia)

Java
code format="source-java" public class HelloWorld {      public static void main ( String [ ] args ) {           System. out. println ( "Hello, world!" ) ; } } Copied from Wikibooks.com and Wikipedia

code

**Java byte-code**
(disassembler output of javap -c HelloWorld) code public class HelloWorld extends java.lang.Object{ public HelloWorld; Code: 0:  aload_0 1:  invokespecial   #1; //Method java/lang/Object." ":V 4:  return public static void main(java.lang.String[]); Code: 0:  getstatic       #2; //Field java/lang/System.out:Ljava/io/PrintStream; 3:  ldc     #3; //String Hello, world! 5:  invokevirtual   #4; //Method java/io/PrintStream.println:(Ljava/lang/String;)V 8:  return Copied from Wikibooks.com and Wikipedia

code

FUN FACTS

 * Java celebrated its 10th year birthday in March 2005
 * All Java keywords are in lower case. For example,, and.
 * All the classes provided with the Java SDK begin with an uppercase letter.
 * In Java, the global name space is the class hierarchy and so, one cannot create a variable outside of a class.This removes the possibility of side effects occurring on a system-wide basis due to some change in the state of a global variable. For example, it is extremely difficult (if not impossible) to ensure that a global variable is changed
 * in a consistent and controlled manner. Java does allow a modified form of the global variable called static variables.
 * Java has no pointers but instead uses references. A reference provides access only to the functionality of the object. The programmer does not have direct access to memory removing the dangers of pointer manipulation.