Introduction To Java
Introduction To Java
Here, on this page Introduction To Java Programming language we will discuss about all its features and advantages along with disadvantages, Java is an object-oriented, class-based programming language with a focus on minimizing implementation dependencies. It is designed to allow application developers to write once and execute anywhere (WORA), which means that compiled Java code can run without the requirement for recompilation on all systems that accept Java. Java is a popular option for enterprise-level applications because of its reputation for simplicity, robustness, and security features.
Salient Features / Advantages of Java
- One of the factors for the widespread popularity of Java is because it is an OOP language.
- We can say that Java is nearly 100% object oriented language. For a language to be completely object oriented, even it’s primitives will have to be object, which is not the case here.
- We have four OOPs concepts:
- JDK consists of compiler and JRE . Whenever a java program is compiled, a dot class file (.class) will be created which is also known as byte code which will be allocated to the jvm to be executed.
- Now we know that JVM is platform dependent that is it accesses the operating system. Since each OS has it’s own JVM, So whatever the OS might be, output is the same.
- Thus we can say it can run in any environment, i.e, it is Platform Independent.
- Early identification and checking for errors can be achieved by the help of garbage collector and exception handler.
- Also a variable cannot be declared without having a data type. All the data types are pre defined as a part of programming language.
- The advantage of being a strongly typed language is that it imposes a set of stringent set of rules on the user which guarantees consistency of the output
- Java codes are converted into byte codes which are implemented on JVM.
- It also performs the tasks of a security manager which are kept updated via internet. It is responsible to throw exceptions.
- For example it raises an OutofBoundary exception in the case of arrays when the user tries to access the index higher than allocated memory.
- It is also strongly typed language.
- It can be easily implemented, since, no concept of pointers explicit memory allocation as well as structures or operator overloading is used here.
- We can write Java program in one environment and implement it on another environment. It can be easily moved among various OS ( Windows, Linux, Mac ) to yield the same output.
A thread can be defined as a light weight process recognized as smallest unit of processing.
Concurrent execution of different parts/threads of a prog.at the same time.for maximum utlisation of the CPU.
Management of allocation and de-allocation of the objects in java is done by either assigning them to heap or stack for easy access and easily restoring the data.
Disadvantages of Java
1. Slow and Inferior Performance
- It is memory consuming and of significantly low performance.
- Slow performance due to extra level of compilation and abstraction of JVM and more memory consuming due to the functioning of garbage collector.
No backup facility. It is much focused on storing the data than backing up the data.
2. Complex Codes
- In java the codes are generally complex in comparison to other languages.
- Java has succeeded to become a manageable language but compromised the ease of understanding for the user.
Hardware Cost increases since memory requirement is high.
4. Memory Management
Memory management: Some applications may have performance issues and higher memory usage as a result of Java’s automated memory management.
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others