GeekInterview.com
Series: Subject: Topic:
Question: 6 of 22

what is platform independent?why java is called so?and what is platform dependent,why C,C++ is called so?

Asked by: Interview Candidate | Asked on: Oct 12th, 2006
Showing Answers 1 - 15 of 15 Answers
Amit Bansal

Answered On : Oct 23rd, 2006

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...

Yes  1 User has rated as useful.
  
Login to rate this answer.
Nidhi Kapur

Answered On : Nov 21st, 2006

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.

Yes  2 Users have rated as useful.
  
Login to rate this answer.
Sowdhaminya

Answered On : Dec 2nd, 2006

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.

  
Login to rate this answer.
Sharmila Devi

Answered On : Aug 22nd, 2008

View all answers by Sharmila Devi

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.

Yes  1 User has rated as useful.
  
Login to rate this answer.

platform independent means, the compiled program can be run on any operating system, JAVA is called so since it generates the byte code which can be run on any
environment.
JAVA is both platform independent and platform dependent

JAVA
platform dependent means the JVM dependent
JAVA platform independent means the compiled code can be executed any where


But here the context we are discussing is based on the code so
platform independent
means
, the compiled program can be run on existing operating system,
but not on other operating system like
C, C++ have the disadvantage that they might got executed in another system.

  
Login to rate this answer.

Platform independency means a program which can be executed on any of the operating system irrespective of the operating system on which it is compiled. Java is so called because its compiled code called as byte code/middle level code (not specific to OS) can be executed on any of the operating system.  This is possible in Java because it provides JVM with respect to each operating system and it converts the byte code to the executable code with respect to the operating system. Whereas in C/C++ its compiled code is specific to the OS
and cannot be executed on other OS. Hence C/C++ is called as platform dependent languages.

  
Login to rate this answer.
nehasai

Answered On : Sep 21st, 2010

View all answers by nehasai

Java language supports interpreter and compiler. Compiler compiles the Java program and generates byte code of
Java program then interpreter interprets or executes Java program for getting desired output. The generated byte code is machine independant. so with byte of
Java program we can execute Java program irrespective of machine hardware,

  
Login to rate this answer.

Yes, first of all JAVA is platform independent because in JAVA we are having JVM complier it will convert source code into BYTE CODE. so, this byte code will be understandable to any type of OS. so only JAVA is said to be PLATFORM INDEPENDENT, but, in C/C++ be don't have that type of special compiler so, only it is said to be PLATFORM DEPENDENT.

  
Login to rate this answer.
prititripathi

Answered On : Sep 25th, 2010

View all answers by prititripathi

A platform independent language is one which can run on any OS, No specific operating system is required
for them while dependent one is that which require specific OS to run it that is
why Java is independent of platform coz no specific requirement of OS is there
and is not platform dependent. Same reason for C and C++

  
Login to rate this answer.
jyoti arora

Answered On : May 29th, 2011

View all answers by jyoti arora

Platform independent means a particular code can be run on different systems. JAVA is considered as platform independent because to run the java program on system, we only need JVM(java virtual machine).


In C/C++ language we need complete software such as turbo c to run the program on system. That is referred as platform dependent.

  
Login to rate this answer.
Dinesh

Answered On : Sep 6th, 2011

If any programming language is said to be platform independent that should satisfy the following

a)The data types of the programming language must take same amount of memory space on every operating system

b)The language must have internal programs to convert one understanding form of o.s to another understanding form of o.s

for Ex:The data type integer in c,c++ takes 2 bytes in dos o.s and it takes 4 bytes in UNIX or Linux
and in c,c++ there are no internal programs to convert one understanding form of o.s to another understanding form of o.s

In the case of java the data types takes same amount of memory space on every o.s and it have the internal programs to convert one understanding form of o.s to another understanding form of o.s

due to this reasons java is said to be platform independent.

  
Login to rate this answer.
vinod

Answered On : Sep 13th, 2011

Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux etc).

  
Login to rate this answer.
GAURAV THAKUR

Answered On : Feb 7th, 2012

Platform independent itself means that which is not dependent on any platform (Operating System).

The main definition of this, is that its Compilation, Execution and Development is independent

  
Login to rate this answer.
anshul sharma

Answered On : Mar 29th, 2012

platform independent means give the input at one system and executing the same program at another computer without making any changes.

  
Login to rate this answer.
mallikarjuna B

Answered On : Jul 16th, 2012

java is called platform independent becoz, in java when a program is compiled what we get is java byte code which is not executable but highly optimized, and JVM interprets this code and converts it in to an machine language of that particular os.however in case of c and c++, code is first compiled in to an machine language of that particular os so we cannot run that compiled program on every machine that uses different platforms.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.