GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  HCL

 Print  |  
Question:  what is platform independent?why java is called so?and what is platform dependent,why C,C++ is called so?



November 11, 2006 02:02:46 #2
 Nidhi Kapur   Member Since: Visitor    Total Comments: N/A 

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.

     

 

Back To Question