Originally called Oak by james Gosling First programming language which is Platform-neutral (platform independent) Simple, reliable ,portable language Java program is not tied to any particular hardware or operating system. Programs developed in java can be executed anywhere on any system. 1. Complied and interpreted first java compiler translates source code into bytecode instructions.(bytecode instructions are not machine instructions) Java interpreter generates machine code that can be directly executed by machine i.e running java program 2.Platform-independent and portable Java programs can be easily moved from one system to another. 3.Object Oriented Java is a true object oriented language 4.Distributed Java is designed as a distributed language for the creating applications on networks. 5.Dynamic and Extensible Java is a dynamic language,it dynamically links new class libraries,methods etc. 6.Multithreaded 7.Simple,Small 8.High performance Java is both compiled and interpreted Source code is compiled into Java bytecode Which is then interpreted by the Java Virtual Machine (JVM) Therefore bytecode is machine code for the JVM Java bytecode can run on any JVM, on any platform including mobile phones and other hand-held devices Networking and distribution are core features In other languages these are additional APIs Makes Java very good for building networked applications, server side components, etc. The Garbage Collector Java manages memory for you, the developer has no control over the allocation of memory (unlike in C/C++). This is much simpler and more robust (no chance of memory leaks or corruption) Runs in the background and cleans up memory while application is running The Just In Time compiler (JIT) Also known as Hot Spot Continually optimises running code to improve performance Can approach the speed of C++ even though its interpreted Security Java offers very fine control over what an application is allowed to do Used in Java Applets to create a sandbox. Stops a rogue applet attacking your machine. Makes Java very safe, an important feature in distributed systems Class Loading Loading of bytecode into the virtual machine for execution Code can be read from a local disk, over a network, or the Internet Allows downloading of applications and applets on the fly and even mobile code Java does not support operator overloading Does not use pointers No header files in java Does not support global variables
Java Language vs Java Platform Current version of the language is 1.4.1 Core language plus additional APIs is called the Java 2 platform Java 2 Micro Edition (J2ME) Very small Java environment for smart cards, pages, phones, and set-top boxes Subset of the standard Java libraries aimed at limited size and processing power Java 2 Standard Edition (J2SE) The basic platform, which this course will cover Java 2 Enterprise Edition (J2EE) For business applications, web services, mission-critical systems Transaction processing, databases, distribution, replication