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
l Compiled and Interpreted
l Platform-Independent and Portable
l Object-Oriented
l Robust and Secure
l Distributed
l Simple, Small and Familiar
l Multithreaded and Interactive
l High Performance
l Dynamic and Extensible
l Ease of Development
l Scalability and Performance
l Monitoring and Manageability
l Desktop Client
Miscellaneous Features
l Core XML support
l Supplementary Character support
l JDBC Rowset
Enhancements in Java SE 6
l Scripting Language Support
l XML Processing and Web Services
l JDBC 4.0 Support
l Annotation-based Programming
l Dynamic Compilation
Enhancements in Java SE 7
l Language Enhancements
l NIO 2.0
l Parallel Programming
l 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