Programming Tutorials

New Features Added by Java

By: Abinaya in Java Tutorials on 2007-09-15  

Java and C++ are both powerful programming languages with their own unique features and capabilities. While there are similarities between the two, there are also several key differences.

Here are some new features added to Java compared to C++:

  1. Garbage Collection: Java has an automatic garbage collector that manages memory allocation and deallocation, which eliminates the need for manual memory management as in C++.

  2. Platform-Independent: Java is platform-independent, which means that Java code can be compiled once and run on any platform without modification, while C++ code must be recompiled for each target platform.

  3. Multi-threading: Java has built-in support for multi-threading, which simplifies concurrent programming compared to C++.

  4. Exception Handling: Java has a robust exception handling mechanism, which makes it easier to write more reliable and maintainable code compared to C++.

  5. Generics: Java has generic types, which provide type safety and enable developers to write more reusable code, while C++ has templates, which can be more complex to use.

  6. Security: Java has a strong security model that includes sandboxing, byte-code verification, and other features to prevent unauthorized access to system resources.

Overall, Java provides a more modern and secure programming environment than C++ while simplifying memory management, multi-threading, and exception handling.

Add Comment

* Required information


No comments yet. Be the first!

Most Viewed Articles (in Java )

Latest Articles (in Java)