DEV Community

Dek Nurul
Dek Nurul

Posted on

Advantages And Disadvantages Of Java Programming Language

Java Advantages

  1. Multiplatform

The main advantage of Java is that it can run on multiple platforms / computer operating systems , in accordance with the principle of write once, run anywhere . With this advantage the programmer simply writes a Java program and compiles (converted, from a human -understood language to a machine language / bytecode ) once and then the result can be run on multiple platforms without changes. This advantage allows a java -based program to work on the Linux operating system but run well on Microsoft Windows. Platforms supported to date are Microsoft Windows , Linux , Mac OS and

Sun Solaris . The reason is that each operating system uses its own program (which can be downloaded from a Java site) to interpret the bytecode .

  1. Complete Classroom Library

Java is known for its library equipment ( a group of programs included in java programming) that is very easy to use by programmers to develop their applications. The completeness of this library is coupled with the existence of a large Java community that is constantly creating new libraries to cover all application development needs.

  1. C ++ style

It has syntax like the C ++ programming language so it attracts many C ++ programmers to move to Java. Currently there are many Java users, most of them are C ++ programmers who have moved to Java. Universities in the United States are also beginning to move by teaching Java to new students because it is easier for students to understand and can be useful as well for those who are not majoring in computers.

  1. Garbage Collection

Automatically, it has the facility of setting memory usage so that programmers do not need to perform memory settings directly (as is the case in the widely used C ++ language).

Deficiency

  1. Write Once, Run Anywhere

There are still some things that are not compatible between one platform and another. For J2SE , for example SWT-AWT bridge which until now does not work on Mac OS X.

  1. Easy to Decompile

Decompilation is the process of turning from current code into source code. This is possible because Java-based code is a bytecode that stores many high-level language attributes, such as class names, methods, and data types. The same is true of the Microsoft .NET Platform . Thus, the algorithm used by the program will be more difficult to hide and easily hijacked/ reverse-engineered .

  1. Excessive Memory Consumption

Memory usage for Java -based programs is much greater than previous generation high -level languages ​​such as C/ C ++ and Pascal (more specifically, Delphi and Object Pascal ). Usually this is not a problem for those who use the latest technology (because the trend of installed memory is getting cheaper), but a problem for those who still have to struggle with computer machines older than 4 years.

Discussion (3)

Collapse
jwp profile image
John Peters

C# is light years ahead.

Collapse
wiseai profile image
Mahmoud Harmouch

It is the other way around. Java is so advanced. Here is a good example:

Never mind. Just discovered that C# is also capable of doing such concurrency. Good to know.

Having used both languages in the past, I think they are both equally complex.

Collapse
natescode profile image
Nathan Hedglin

Why the JavaScript tag? Java != JavaScript