Why Java is Secured than other languages?

The Output of C, C++' s compiler is Executable code. But Java complier convert the Java code into byte code (.class file) and these byte codes are then run by Java Virtual Machine (jvm) . JVM is an interpreter which is installed in each client machine that is updated with latest security updates by internet . When this bytecodes are executed , the jvm can take care of the security. So, java is said to be more secure than other programming languages.

Translating the java program into bytes code makes it easier to run a program in variety of environments. For this the JVM needs to be implemented for each platform. The JVM provides a secure runtime environment by managing memory, etc. The dynamic way in which the JVM allocates the various memory areas means that it is almost impossible for a would-be attacker to determine what memory areas to attempt to insert malicious instructions into. Bounds checking on arrays prevent unreferenced memory accesses.

0 comments:

Post a Comment

 
Copyright 2011 Java Online