Security in Java
The Internet is an open medium and, therefore, susceptible to security risks. Java technology, with its unique bytecode concept, is best suited for client/server applications over the internet/web and therefore needs protection against any malicious software (a.k.a virus) embedded within bytecode travelling to client machines over the net. This is even more dangerous for distributed systems because malicious software may spread around those systems as well.
To catch this malicious code, the Java interpreter verifies whether the incoming bytecode is strictly language compliant and executes only if the code is valid. Thus, Java traps any rogue code and prevents the systems and applications from being damaged.
Portable, Robust and Scalable
Writing Java code is not very different from C/C++ and is almost similar to writing codes in other programming languages.
Java bytecodes are independent of any underlying system architecture and instruction set of any particular machine. Moreover, Java characters are Unicode based for international portability. Thus, the availability of Java Runtime at the client machine/client browser is the major requirement of application portability.
Explicit memory manipulation through the use of pointer arithmetic is not allowed in Java. Array bounds violations are always checked at runtime, ensuring that the memory does not tamper. This makes Java fit for robust applications.