Posted by: ahmedashfaque | February 17, 2015

Why Java is so popular? part 3


In the part 1 and then part 2 of this series we discussed some reasons for popularity of Java programming language. In this part we will discuss about fault tolerance aspect of Java.

All programming languages have variable data types. Each data type is used for doing a different kind of computation. For example, an integer type variable is used to hold integer values for computations. Similarly a character type is used for doing computations where strings and characters are involved in any computation. E.g. if we want to hold user names in a textbox at a user interface then string data type will be used.

Java is a strongly typed programming language. What it means is that when you program using Java then the compiler will not allow you to assign a value to a variable if it is not defined. The compiler will also not allow you to hold a data in a variable of a different data type.

For a new comer it may pose some problems. For example, a new comer may not know subtle differences between different data types  and thus may find it difficult to compile his/her code because of some minor error in his/her program. But this apparent shortcoming is a disguise in blessing.

What happens is that if your programming language is strongly typed then your source code is immune to faulty performance when it runs. Since all errors are already restricted through data type checking of variables in programming language itself, your code will be highly fault tolerant. For example if you have defined a text field on your user screen as an integer but the user enters some values different than an integer (character or date or float for example) then the system will raise an error and will not accept the entered data. This will save you a lot of heartache. Your program will allow only the right values to be accepted and saved to the database. On the other hand if typing checking is not handled then even garbage values will be accepted and saved in the database.

You can see the immense value of fault tolerance in a programming language. Java definitely scores very highly in this area.

Advertisements

Responses

  1. […] been discussing about reasons for popularity of Java programming language over part 1, part 2 and part 3. We will continue this discussion […]

  2. […] far we have seen many features of Java programming language in part 1, part 2, part 3, and part 4. Let us continue the discussion in this […]

  3. […] far in part 1, part 2, part 3, part 4, part 5 and part 6 we have covered many topics on Java. In this post we will see […]

  4. […] far in part 1, part 2, part 3, part 4, part 5, part 6 and part 7 we have covered many topics on Java. In this post we will see […]

  5. […] far in part 1, part 2, part 3, part 4, part 5, part 6, part 7 and part 8 we have covered many topics on Java. In this post we […]

  6. […] far in part 1, part 2, part 3, part 4, part 5, part 6, part 7, part 8 and part 9 we have covered many topics on Java. In this […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: