Why Java is secured compare with other languages? Explain with example.

Showing Answers 1 - 7 of 7 Answers

In Programming languages like C++ the memory management is handled by the user like deleting objects once the object is no more useful is the programmers responsibility.  Whereas in java its automatically done ie Garbage collection.
Also java has eliminated pointers which can create a lot of unwanted and confusing memory references resulting in memory waste.

  Was this answer useful?  Yes

bhaskarrao

  • Dec 2nd, 2007
 

Another reason is byte code is executed under JAVA Runtime Environment. which has several Security related checking, (particularly when related to file access Programs). It is more secure.

  Was this answer useful?  Yes

matteti_kk

  • Dec 4th, 2007
 

The main reason behind the java's security are ......
1) no readability i.e., contains byte code understandable to only JVM
2) no virus will infect the byte code. Even if the virus entered into byte code the jvm doesn't understand it, so jvm keeps these instructions as it is. No executable code will be generated to this virus.

Java is more secured programing language, because Java byte code for this code virus cannot infect, It maintaines number of secure checking points but in other language which will be in the form of exe format, virus can easily infect the exe, img, bat files so Java is more secured programing language

Regards,

Madhav 

  Was this answer useful?  Yes

First of all Java is Object Oriented Programing Language and Java supports
for Internet and Networking-based Applications, its is more secured then the
other languages like C, C++. Another reason is byte code is executed under JAVA
Runtime Environment. which has several Security related checking, . It is
understandable by JVM only. Regarding this very difficult to Trap the Internet
and Network based Applications by the Hackers, This is one of the reasons for
using Java
konnipati.sivakumar

  Was this answer useful?  Yes

aleemkh

  • Jul 29th, 2008
 

Before talking about secure , let us compare the difference between C and Java.

First a C program is coverted as shown below

C(sourcecode) --> compiler---> compiles to binary (101010)---> OperatingSystem--->executes the program

As we can see the Operating system directly interacts with the binary file generatd by C compiler. If this binary file (which is .exe file) is infected with virus it will definetly effect Operating system

Now let us see in Java

java(source code) --> compiler---> compile to bytecode(.class file)--->JVM --->converts/executes to binary(001010)--->Operatingsystem--->executes

The Byte code goes through JVM and only JVM can convert byte code to machine readable form that is binary. The virus cannot go inside JVM and manipulate the binary. Immediately after the binary file is generated it is executed by Operating system and hence it is 100% secure

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions