>
Characteristics of Java PART 3 is HERE
Java Properties: (Part 2)
- Robust:
- Java is robust because it is more reliable. It ensures the reliability by providing early checking for possible errors. It eliminates error causing constructs such as pointers. Java restricts the programmers in a few key areas, to force them to find mistakes early in program development. At the same time, Java frees from having to worry about many of the most common causes of programming errors. Because Java is a strictly typed language, it checks the code at compile time. However, it also checks your code at run time.
- Consider two main reasons of program failure:
- Memory management mistakes and
- Mishandled exceptional conditions (run time errors).
- Memory management is difficult and tedious in c/c++, the programmers have to manually allocate and free memory. This sometimes leads to problems, because programmers will either forget to free memory that has been previously allocated or, worse, try to free some memory that another part of their code is still using. Java virtually eliminates these problems by managing memory allocation and deallocation (by the concept of garbage collection).
- Exceptional conditions arise in situations such as division by zero or “file not found” etc. Java helps in this area by providing object-oriented exception handling.
- Multithreaded:
- Java supports multithreaded programming, which allows writing programs that can do many things simultaneously. The Java run-time system is designed for multiprocess synchronization that enables to run the multithreaded programs smoothly.
- Threads are small individual processes that combine together to perform a specific function. Concept of multithreading can be easily understood by the example of user trying to run a java application and at same time working with a file. Both the processes are considered as a single thread, and this can be coded in java to support multithreading.
- Architecture-neutral:
- One of the main problems faced by programmers is that no guarantee exists that if a program written today will run tomorrow—even on the same machine. Operating system upgrades, processor upgrades, and changes in core system resources can all combine to make a program malfunction. With Java Virtual Machine, the program can be made “write once; run anywhere” (WORA) to a great extent. The concept of bytecodes helps to make the program independent and neutral of any architecture, operating system or processor.
Characteristics of Java PART 3 is HERE
Comments
Post a Comment