Here we discuss the pro's and con's of Java
Advantages
Portability / Compatibility
Java program, despite what machine it is wrote on will work on any machine, there are of course some limitations such as hardware, for example a program requiring a mouse will not work on a mobile phone which obvious does not have a mouse. This is often referred to as being platform independent.
Automated tasks
Languages such as C++ require you to manage more memory functions, java has libraries that manage these for you
| Tech Alert |
| We can use Strings to illustrate this. String are an immutable object (they can not be modified) therefore the reassignment (changing the contents) of a string does not change the string it's self but creates a new one, if the programmer does not reference this old string it is doomed to reside in the computers memory forever, Java provides a utility called garbage collection which takes unreferenced objects and disposes of them. |
Object Orientated
Java is said to be object orientated, i.e. the language lends itself to the creation and use of objects, this is a current fade in programming and is discussed later, but the main benefits are the code becomes more flexible and reusable, reducing development and maintenance time.
Multimedia
Java is multimedia rich language and contains libraries that allow the programmer to use gif's, wavs and other popular media files
Networking
The developers gave some consideration to networking and Java was composed with security, multi-threading and many more network issues in mind, not to mention platform independence.
Easier / Safer
In one sense this is both an advantage and a disadvantage, Java doesn't allow many of the difficulties of C++, and consequently cuts down on the problems of C++ in terms of memory leaks, however this restriction on pointers, etc. also makes java just that little bit more inflexible than C++.
Disadvantages
Slow
Java is still relatively slow, the programs when complied are in a language the Java Virtual Machine understands, this is turn converts them to a language (e.g. binary) the computer understands, languages like C++ skip this intermediate step and consequently run faster.
A High Level Language
Not so much a disadvantage as a trait, high level languages like Java can be difficult to learn as you are controlling a computer at a very low level (low means you control the most basic of functions, such as memory, etc.), the given advantage is that if you learn or already know a high level language other high level languages become easier to pick up as the generally programming concepts and structures are the same in every language.
|