GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  HCL
Go To First  |  Previous Question  |  Next Question 
 HCL  |  Question 18 of 23    Print  
what is platform independent?why java is called so?and what is platform dependent,why C,C++ is called so?

  
Total Answers and Comments: 4 Last Update: August 22, 2008     Asked by: nagaraju.dv 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Nidhi Kapur
 

Platform independent means the execution of the program is not restricted by the type of os environment provided...thereby, make it possible to process the program at any type of environement available.

Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.

Whereas C and C++ are complied languages which makes them platform dependent. The source code written in C / C++ gets transformed into an object code which is machine and OS dependent. That's the reason why C and C++ languages are termed as Platform Dependent.



Above answer was rated as good by the following members:
ashwinivmaka, ibraheemcu, rks4288
October 23, 2006 14:41:54   #1  
Amit Bansal        

RE: what is platform independent?why java is called so...

Platform independent means the process in which the ceratin language is capable of running on all types of operating system

I hope Im right to some extent...

Thanks...

AMIT BANSAL...


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
November 21, 2006 02:02:46   #2  
Nidhi Kapur        

RE: what is platform independent?why java is called so...

Platform independent means the execution of the program is not restricted by the type of os environment provided...thereby make it possible to process the program at any type of environement available.

Java is a platform independent language becoz of the bytecode magic of java. In java when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.

Whereas C and C++ are complied languages which makes them platform dependent. The source code written in C / C++ gets transformed into an object code which is machine and OS dependent. That's the reason why C and C++ languages are termed as Platform Dependent.


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
December 02, 2006 00:54:09   #3  
Sowdhaminya        

RE: what is platform independent?why java is called so...
Platform independent means write once run anywhere .Java is called so because it can run on any machine having the java core independent of the platform.Platform dependent is just the opposite of platform independent.The source code has to be modified according to the platform.C and C++ are so called because it's code has to be changed concerning the machine.
 
Is this answer useful? Yes | No
August 22, 2008 06:17:18   #4  
Sharmila Devi Member Since: August 2008   Contribution: 1    

RE: what is platform independent?why java is called so?and what is platform dependent,why C,C++ is called so?
In Java the source program is first compiled that generates BYTE CODE which is common for all platform. The Byte code is given to JVM (Interpreter) each platform has its own JVM. which converts byte code into machine language that can be understood by the particular machine only. Once the machine having JVM it can run any java program. In C C++ the source program directly compiled into machine code which is platform dependent.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
Related Categories
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