Advantages of Java:
Simple: Java was designed to be easy to use, write, compile, debug, and learn than other programming languages. Java is much simpler than C++ because Java uses automatic memory allocation and garbage collection.
Object-Oriented: Allows you to create modular programs and reusable code.
Platform-Independent: Ability to move easily from one computer system to another
Distributed: Designed to make distributed computing easy with the networking capability that is inherently integrated into it.
Secure: The Java language, compiler, interpreter, and runtime environment were each developed with security in mind.
Allocation: Java has the feature of Stack allocation system. It helps the data to be stored and can be restored easily.
Multithreaded: The capability for a program to perform several tasks simultaneously within a program.
Disadvantages of Java:
Performance: 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.
Single-paradigm language: The addition of static imports in Java 5.0 the procedural paradigm is better accommodated than in earlier versions of Java.