Hello All ,
This is my First post about java. Everything has its own and very popular history. So when I think about java the very first question arrived in my mind is how and why java ? Because we have c with us for the core programming and we have c++ for the entire object oriented concept. After going through a long discussion and from the internet I founded some facts which are sufficient for my queries.
So Let’ start with my first question
How we got java?
Java was created by a team led by James Gosling for Sun Microsystems, James Gosling, Mike Sheridan, and Patrick Naughton initiated the Java language project in June 1991. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time.
The language was initially called Oak after an oak tree that stood outside Gosling’s office; it went by the name Greenlater, and was later renamed Java, from Java coffee, said to be consumed in large quantities by the language’s creators. However, when Java 1.0 was released to the public in 1996, its main focus had shifted to use on the Internet.java language derives much of its syntax from c and c++ but has a simpler object model and fewer low-levelfacilities.
Java is a fully functional, platform independent, programming language it has powerful set of machine independent libraries, including windowing (GUI) libraries.Java applications are typically compiled to byte code (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture.
The most interested thing about java is “write once, run anywhere” (WORA), meaning the code that runs on one platform does not need to be recompiled to run on another.
Why java ?
One characteristic of Java is portability, which means that computer programs written in the Java language must run similarly on any hardware/operating-system platform. This is achieved by compiling the Java language code to an intermediate representation called Java byte code, instead of directly to platform-specific machine code.
Java byte code instructions are analogous to machine code, but are intended to be interpreted by a virtual machine(VM) written specifically for the host hardware. End-users commonly use a Java Runtime Environment (JRE) installed on their own machine for standalone Java applications.
Java is very powerful language but it has its own pros and cons too. so lets discuss some strong and weak points of java.
- The syntax is familiar to the programmers that know any other C based language.
- Java (the platform) has a very large and standard class library, some parts of which are very well written.
- Java provides a platform for behavioral transfer from one address space to another. This is particularly evident in the dynamic class loading mechanisms of RMI (Remote Method Invocation).
- Automatic Memory Management implemented by Garbage Collection
- Explicit Interfaces
- Improving performance
- Good portability (certainly better than that of nearly any compiled alternative)
- Simplified syntax (compared to C++)
- Language design not committee driven
- Lots of available code and third-party libraries
- If you love OOP, the only way to write functions is to make them class methods.
- Many standard interfaces defined in the standard library, which would have been vendor/OS specific otherwise, helps a lot in achieving portability and ease integration/selection of 3rd party libraries. E.g. JDBC, JMS, JCE, JAI, serial I/O, JAXP, JNDI, etc. Some have correspondence in other languages (e.g. ODBC) but not all.
- Performance: Java can be perceived as significantly slower and more memory-consuming than natively compiled languages such as C or C++.
- Look and feel: The default look and feel of GUI applications written in Java using the Swing toolkit is very different from native applications. It is possible to specify a different look and feel through the pluggable look and feel system of Swing.
- Single-paradigm language: Java is predominantly a single-paradigm language. However, with the addition of static imports in Java 5.0 the procedural paradigm is better accommodated than in earlier versions of Java.
So , this is all about java from my side. This are some very basic things about java . I hope it will give all of u a good start with java.