GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 441 of 502    Print  
Why Java is secured compare with other languages? Explain with example.

  
Total Answers and Comments: 7 Last Update: July 30, 2008     Asked by: selvarani 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: aleemkh
 

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



Above answer was rated as good by the following members:
tmastanbabu, sujithkthomas
November 16, 2007 13:58:55   #1  
aneesm Member Since: November 2007   Contribution: 3    

RE: Why Java is secured compare with other languages? ...

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.


 
Is this answer useful? Yes | No
December 02, 2007 01:02:24   #2  
bhaskarrao Member Since: November 2007   Contribution: 2    

RE: Why Java is secured compare with other languages? Explain with example.
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.
 
Is this answer useful? Yes | No
December 04, 2007 08:55:00   #3  
matteti_kk Member Since: October 2007   Contribution: 2    

RE: Why Java is secured compare with other languages? Explain with example.
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.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 11, 2008 23:22:08   #4  
sampra Member Since: February 2008   Contribution: 278    

RE: Why Java is secured compare with other languages? Explain with example.
Given reasons are enough
 
Is this answer useful? Yes | No
July 28, 2008 09:17:30   #5  
GMadhavaReddy222 Member Since: July 2008   Contribution: 3    

RE: Why Java is secured compare with other languages? Explain with example.
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

 
Is this answer useful? Yes | No
July 29, 2008 05:06:58   #6  
konnipati.sivaa Member Since: October 2007   Contribution: 6    

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

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


 
Is this answer useful? Yes | No
July 29, 2008 07:18:25   #7  
aleemkh Member Since: July 2008   Contribution: 17    

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

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


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape