Thursday, 18 June 2015

Introduction to Java Programming Language

Java is a general-purpose, object-oriented language developed by Sun Microsystems of USA in 1991. Originally called Oak by James Gosling, one of the inventor of the language, Java was designed for the development of software for consumer electronic devices. The goal had a strong impact on the development team to make the language simple, portable and highly reliable.

Java Features


Compiled and Interpreted
Platform-Independent and Portable
Object-Oriented
Robust and Secure
Distributed
Simple, Small and Familiar
Multithreaded and Interactive
High Performance
Dynamic and Extensible
Ease of Development
Scalability and Performance
Monitoring and Manageability
Desktop Client

Miscellaneous Features


Core XML support
Supplementary Character support
JDBC Rowset

Enhancements in Java SE 6


Scripting Language Support
XML Processing and Web Services
JDBC 4.0 Support
Annotation-based Programming
Dynamic Compilation

Enhancements in Java SE 7


Language Enhancements
NIO 2.0
Parallel Programming
Dynamic Language Support

How Java Differs from C and C++ ?


Although Java was modeled after C and C++ languages, it differs from C and C++ in many ways. Java does not incorporate a number of features available in C and C++.

Java and C


1. Java does not include the C unique statement keywords sizeof and typedef.
2. Java does not contain the data type struct and union.
3. Java does not support an explicit pointer type.
4. Java does not define the type modifiers keywords auto, extern, register, signed and unsigned.
5. Java does not have a preprocessor and therefore we cannot use #define , #include and #ifdef statements.
6. Java requires that the functions with no arguments must be declared with empty parenthesis and not with the void keyword as done in C.
7. Java adds new operators such as instancef and >>> .
8. Java adds labeled break and continue statements.
9. Java adds many features required for OOP.

Java and C++


1. Java does not support operator overloading.
2. Java does not have template classess as in C++.
3. Java does not support multiple inheritance of classes. This is accomplished using a new feature called “Interface”.
4. Java does not support global variables. Every variable and method is declared within a class and forms part of that class.
5. Java does not use pointers.
6. Java has replaced the destructor function with a finalize() function.
7. There are no header files in Java.


No comments:

Post a Comment