When Java
is used for computing the following aspects have to be considered.
- Java is language oriented and hence it is closer to real world. For
example when we declare a variable as integer, it is always 32 bits
unlike in C in which it can be 16 bits or 32 bits depending on the compiler/machine.
Characters are represented in C by 8 bits whereas in Java it uses Unicode,
a 16-bit code. The advantage is that any word language can be represented.
So format or character representations are immaterial in the network.
- Code moves from machine to machine: Java applet is downloaded into
the machine and then executed. So, it is the code that moves to the
machine and not the other way. Here the problem is security.
- Security features are provided: One security mechanism is byte code
verifier and the other is a digital signature. However, security remains
an issue in Java.
- Exception handling: exceptions are handled easily through exception
handling mechanism in Java. This reduces errors due to bad programming.
- Polymorphism: A particular function can take different types of variables
unlike in C. the same name can be used for different functions with
different argument types. Also operator overloading is possible. Can
be used for addition as well as for string concatenation.
|
|