Java (programming language)
Paradigm(s) | multi-paradigm: object-oriented, structured, imperative, generic, reflective |
---|---|
Appeared in | 1995 |
Designed by | James Gosling and Sun Microsystems |
Developer | Oracle Corporation |
Stable release | Java Standard Edition 7 Update 2 (1.7.2) (December 12, 2011 | )
Typing discipline | Static, strong, safe, nominative, manifest |
Major implementations | OpenJDK, many others |
Dialects | Generic Java, Pizza |
Influenced by | Ada 83, C++, C#, Eiffel,[1] Generic Java, Mesa,[2] Modula-3,[3] Oberon, Objective-C, UCSD Pascal,[4][5] Smalltalk |
Influenced | Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Groovy, J#, JavaScript, PHP, Python, Scala, Vala |
OS | Cross-platform (multi-platform) |
License | GNU General Public License / Java Community Process |
Usual filename extensions | .java, .class, .jar |
Website | For Java Developers |
![]() |
Java is a programming language. It was first developed by James Gosling at Sun Microsystems, which is now a part of Oracle Corporation. It was released in 1995 as a part of Sun Microsystems' Java platform. The language has developed much of its syntax from C and C++. Java applications are usually compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM). Java is currently one of the most popular programming languages being used. It has about 10 million users.[6][7]
Java and JavaScript are not the same thing; in fact, they are not even related. JavaScript is a scripting language which is used mainly for web browsers.
Contents |
[change] Background
Java is object oriented. Java code looks a lot like C++ or C code. Unchanged C++ or C code will not work in Java, in most cases.
Java can run on many different operating systems. This makes Java platform independent. Java does this by making the Java compiler turn code into Java bytecode instead of machine code. This means that when the program is executed, the Java Virtual Machine interprets the bytecode and translates it into machine code.
[change] Basic concepts
When Java was developed, they tried to reach these five goals:[8][9]
- It should be simple, object-oriented, distributed and easy to learn.
- It should be robust and secure.
- It should be independent of a given computer architecture or platform.
- It should be very performant.
- It should be possible to write an interpreter for the language. The language should also support parallelism and use dynamic typing.
[change] Platform
The Java platform refers to a group of software products from Sun Microsystems. The platform is used to develop and run Java programs. The platform includes the execution engine (called a Java Virtual Machine) that allows Java programs to do the same thing on different computer systems.
[change] Example
An example Hello World program:
/** * This is a simple program in Java. * It shows "Hello World!" on the screen. */ class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); } }
[change] Types of Java
There are many types of Java programs which run differently:
- Applet - can be put online (in web browsers).
- Application - can only be run on the computer, cannot be put online.
- Servlet - runs on a server and helps to display web pages.
- Swing application - like an application, but can have a more graphical look.
- ejb - an application for business purpose
[change] Criticism
The programming language Java has also been criticised. Some of the criticisms are:
- Generics were added to Java in such a way so that existing code would still keep running. This was done using type erasure. This means that during compilation, the actual type of a generic argument is removed. This can lead to the Java interpreter to behave in unexpected ways at times.
- Java has no unsigned integer types, which languages like C heavily use. This also means that its impossible to directly exchange numeric data between C and Java programs. Cryptography also relies on such types to some extent; this makes it more difficult to write applications that use cryptography in Java
- The IEEE has defined a standard for floating-point arithmetic, IEE 754. Java only supports a part of the features of this standard.
[change] References
- ↑ Gosling, James; and McGilton, Henry (May 1996). "The Java Language Environment". http://java.sun.com/docs/white/langenv/Intro.doc1.html#943.
- ↑ Gosling, James; Joy, Bill; Steele, Guy; and Bracha, Gilad. "The Java Language Specification, 2nd Edition". http://java.sun.com/docs/books/jls/second_edition/html/intro.doc.html#237601.
- ↑ "The A-Z of Programming Languages: Modula-3". Computerworld.com.au. http://www.computerworld.com.au/index.php/id;1422447371;pp;3;fp;4194304;fpid;1. Retrieved 2010-06-09.
- ↑ TechMetrix Research (1999). "History of Java". Java Application Servers Report. http://www.fscript.org/prof/javapassport.pdf. "The project went ahead under the name "green" and the language was based on an old model of UCSD Pascal, which makes it possible to generate interpretive code"
- ↑ "A Conversation with James Gosling – ACM Queue". Queue.acm.org. 2004-08-31. http://queue.acm.org/detail.cfm?id=1017013. Retrieved 2010-06-09.
- ↑ "Programming Language Popularity". 2009. http://www.langpop.com/. Retrieved 2009-01-16.
- ↑ "TIOBE Programming Community Index". 2009. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html. Retrieved 2009-05-06.
- ↑ James Gosling, Henry McGilton: The Java Language Environment. 1.2 Design Goals of the Java Programming Language. Mai 1996.
- ↑ The Java Language: An Overview. 1995 Sun Whitepaper
[change] Other websites
- Java home page
- Java for developers
- Java tutorials from Sun
- A Brief History of the Green Project
- Java: The Inside Story
- Java Was Strongly Influenced by Objective-C
- The Java Saga
- A history of Java
- The Long Strange Trip to Java
- How to Program with Java
- Best practices in Java