Skip to main content

Characteristics of Java OR Java Buzzwords (Part 2)

>

Java Properties: (Part 2)

  1. 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.
  2. 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.
  3. 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 1 is HERE
Characteristics of Java PART 3 is HERE

Comments

Relevant to YOU:

Popular posts from this blog

ASCII Code in Java (Part 1)

> The ASCII Code: (Part 1) ASCII stands for "American Standard Code for Information Interchange". As you may remember (Grade 9), computers only work with HIGH(1) and LOW(0) electrical states, known as bits, with correspond to mathematical Base 2 numbers. That is, computers only understand binary language. ASCII codes represent text (or other things) in computers. Assume that you are working with MS Word, or PPT or any other tool that uses text based inputs from user. You need to type a sentence that computer is not aware of. ASCII codes help to exchange this information between user and computer. When you type a character, it is converted into ASCII code first and then into Binary, which makes the computer understand what is to be typed. Hence every key on the keyboard has a specific ASCII code which is used to make the computer understand our language. If you press 4 from keyboard, then keyboard send the value 100 (value equival...