Advantage and Disadvantage of Java
Advantage of Java
- Java is a platform independent that program can write once and run on any operating system or any hardware.
- Java is simple: Java is simple If you already understand the basic concepts of object-oriented programming, learning Java will be even easier.if you are an experiencedmC++ programmer, moving to Java will require very little effort. Because Java inherits the C/C++ syntax and many of the object-oriented features of C++. java design is easy to uses , java is easy to write, compile and debug and learn than other programming languages. Java uses automatic memory allocation and garbage collection else C++ requires the programmer to allocate memory and to collect garbage so these languages are more complex.
- Java is object oriented: Java is object oriented programming. Java is cantered on creating objects, manipulating objects and making objects work together. This allows us to create an application in modular programs and reusable code.
- Java is platform independent: Java program write once and run on any operating system or any hardware. Java source code compile then convert into byte code (.class) this .class is execute through jvm any operating system or hardware.
- Java is distributed: Java is used distributed computing means involves several computers on a network working together. Java is designed to make distributed computing easy with the networking capability that is inherently integrated into it.
- Java is interpreted: An interpreters is execute the byte code (.class file) The byte code is machine independent and run on any machine that has a Java interpreter. The program is compiled only once, and then byte code generated then jvm is a interpreted and execute one by one through just in time.
- Java is secure: Java is one of the first programming languages to consider security as part of its design. The Java language, compiler, interpreter, and runtime environment were each developed with security in mind.
- Java is robust: Robust means reliable and no programming language can really assure reliability. Java puts a lot of emphasis on early checking for possible errors, as Java compilers are able to detect many problems that would first show up during execution time in other languages.
- Java is Multithreaded: Multithreaded is the capability for a program to perform several tasks simultaneously within a program. Multithreading is a necessity in visual and network programming.Java supports multithreaded programming, which allows you to write programs that do many things simultaneously.
Disadvantage of Java
- It take more time consuming to execute the program is compile and generate byte code then jvm is interpreted and then execute.
- Compiled program is run is fast and interpreter program is slow. Java is uses byte code convert to machine language through interpreter java program little slow to c or c++.
- Java applications runs on jvm which is a program. It may be written incorrect.It is difficult to write a perfect program, especially if it is as big as a virtual machine, so that programs written in Java langauge tend to suffer from slightly different problems depending on the platforms on which the Java virtual machines run.