Java is a popular programming language, created in 1995. It is owned by Oracle, and more than 3 billion devices run Java.
It is used for:
- Mobile applications (specially Android apps)
- Desktop applications
- Web applications
- Web servers and application servers
- Database connection
- And much, much more!
Advantages and disadvantages of java
- Simple and Small
- Compiled and Interpreted
- Platform Independent
- High performance
1. Simple and Small
Java is small and simple language. Java is easier to code and simple to use. In java language constructs are easy to learn and use. Many features of C and C++ are not part of java For example: Java does not use pointers, preprocessor header files, go to statement and many others, operator overloading, multiple inheritance etc.
Java was designed to be easy for the professional programmer to learn and use effectively. Assuming that you have some programming experience so, you will not find java hard to master. If you already understand basic concepts of OOPs, Learning java is easier And if you are experienced C++ programmers, moving to java will require very little effort because java inherits the C/C++ syntax and many of the Object oriented features of C++.
Familiar is another striking feature of java to make language look familiar to the existing programmers it was modelled on C and C++ language. Java uses many constructs of C and C++ and therefore, Java Code Looks like a C++ Code. In Fact, Java is a simplified version of C++.
3. Compiled & Interpreted
Usually a Computer language is either compile or interpreted. Java combines both these approaches, thus making java a two stage system. 1st, java compiler translates source code into ByteCode instructions. ByteCode are Not Machine instruction And therefore, in the 2nd stage. java interpreter generates machine code that can be directly executed by the machine that is running the java program we can thus say that java is both a compiled And an interpreted languages.
4. Platform Independent
Platform independent means the ability of the program to run on different platform without modification. Java programs can be easily moved from on PC system to another, Anywhere and Anytime. we can download a java applets from a remote computer onto our local system by internet And execute it locally.
5. Object Oriented
Java is a true Object oriented Language. Almost everything in java is an object. All program code and data reside within objects and classes. Java comes with an extensive set of classes, arranged in packages, that we can use in our programmes by inheritance. Java is most popular languages because it also supports code reusability, Maintainability etc. In Java, the data and methods together determine the state and the behaviour of an objects.
Java is a robust languages It provides many safeguards to ensure reliable code. Java frees to worry about causes of programming errors because java is a strictly typed languages it checks the code at compile time. It also check the code at run time. thus java has strict compile and run time checking of code which minimize programming errors. exceptional conditions like “Division by zero” or “File not Found” is often arrive. Java helps in the area by providing exception handling concept which captures series errors and eliminates any risk of crashing the system.
Various types of PC and Operating systems are used all over the world are connected through internet. for programmes to be downloaded, same way of generating portable executable code is needed. Protect you against malicious code that might try to invade your file system.
Security is an important features for java. Java security features ensure that the programs that run from web pages are safe. Java systems not only verify all memories access but also ensure that no viruses are communicated with an applet. The absence of pointers in java ensures that programmers cannot gain access to memory locations without proper authorization.
Java programs running on the web cannot open, read, write or delete files on the user system. Java was designed with security in mind. As java is intended to be used in network/distributor environments so it implements several security mechanisms to.
Java uses a multi-threaded environment in which a bigger task can be converted into various threads and run separately. The main advantage of multi-threading is that we need not provide memory to every running thread.
Java is faster than other traditional interpreted programming languages because Java bytecode is “close” to native code. It is still a little bit slower than a compiled language (e.g., C++). Java is an interpreted language that is why it is slower than compiled languages, e.g., C, C++, etc.
Disadvantages of Java Programming languages.
- Memory Consumption
- Less machine Interactives
- Garbages collection
Java needs to be interpreted during runtime, which allows it to run on every operating system(OS), but it also makes it perform slower than the languages like C & C++ . On the other hand, the C++ program needs to be compiled on each operating system, directly to binary and therefore runs faster.
2. Memory Consumption
Java program consumes more memory since it runs on top of Java virtual machine(JVM).
Java programming language need higher processing and memory requirements. So, it need better hardware to run the Java program.
4. Less machine Interactives
Java lacks when it comes to interacting directly with machines, making it less viable for the software that needs to run quickly and run directly with the machine, as explicit pointers are also missing in Java.
5. Garbage’s collection
Java provides automatic garbage collection that cannot be controlled by the programmers. It doesn’t provide the methods like delete() and free() to free the memory. However, due to the various disadvantages, Java is one of the most used programming languages due to its advantages, making it platform-independent, portable, secure and a robust programming language.
MORE TECHNICAL INFORMATION
What will I get when I download Java software from java.com?
The Java Runtime Environment (JRE) version 8 is what you get when you download Java software from java.com.
The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. The JRE is the runtime portion of Java software, which is all you need to run Java WebStart applications from a supported web browser. It doesn’t come with development tools, though – these tools are part of the Java Development Kit (JDK)
What is Java Plug-in software?
The Java Plug-in software is a component of the Java Runtime Environment (JRE). The JRE allows some applications written in the Java programming language to launch via some browsers. The Java Plug-in software is not a standalone program and cannot be installed separately.
I have heard the terms Java Virtual Machine and JVM. Is this Java software?
The Java Virtual Machine is only one part of Java software that is involved in running an application. The Java Virtual Machine is built right into your Java software download, part of the JRE and helps run Java applications.
Author: Prithvi.L [MBA in Digital marketing and Ecommerce]