Jumat, 16 Januari 2009

JAVA




JAVA

What is JAVA ?

Java is a programming language originally developed by Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode that can run on any Java virtual machine (JVM) regardless of computer architecture.

History

James Gosling initiated the Java language project in June 1991 for use in one of his many set-top box projects. The language, initially called Oak after an oak tree that stood outside Gosling's office, also went by the name Green and ended up later renamed as Java, from a list of random words.[5] Gosling aimed to implement a virtual machine and a language that had a familiar C/C++ style of notation.

Sun released the first public implementation as Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA), providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run secure Java applets within web pages, and Java quickly became popular. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998), new versions had multiple configurations built for different types of platforms. For example, J2EE targeted enterprise applications and the greatly stripped-down version J2ME for mobile applications. J2SE designated the Standard Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.

In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process. Java remains a de facto standard, controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) (a subset of the SDK); the primary distinction involves the JRE's lack of the compiler, utility programs, and header files.

On 13 November 2006, Sun released much of Java as free and open source software under the terms of the GNU General Public License (GPL). On 8 May 2007 Sun finished the process, making all of Java's core code free and open-source, aside from a small portion of code to which Sun did not hold the copyright.


Areas of Use


Java is used to develop applications in a number of different areas. Some of them are listed below:

* Accounting
* Business
* Commerce
* Consulting
* Education
* Law
* Marketing and Sales
* Research
* Science
* etc

The Advantages

-can solve the problem in our life
-can be used in Symbian series
-low of memory
-Overcame and avoided the problem crash in programming

The Disadvantages

-difficult syntax
-must save the file text with .(dot)java extension

The Syntax

/**

* Outputs "Hello, World!" and then exits

*/

public class HelloWorld {

public static void main(String[] args) {

System.out.println("Hello, World!");

}

}

---------------------------------
/*and for example the other*/
---------------------------------

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

public class Micek1
{
public static void main(String[]args)
{
JFrame frame=new JFrame("HAHA");
JMenuBar menuBar=new JMenuBar();
JMenu menu=new JMenu("File");
JMenuItem itemOpen=new JMenuItem("open");
JMenuItem itemClose=new JMenuItem("Close");

frame.setJMenuBar(menuBar);
menuBar.add(menu);
menu.add(itemOpen);
menu.add(item.Close);

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400,200);
frame.setVisible(true);
}
}

Tidak ada komentar:

Posting Komentar