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

Showing Answers 1 - 27 of 27 Answers

Amit Bansal

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



Nidhi Kapur

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


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

  Was this answer useful?  Yes

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.

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
JAVA is both platform independent and platform dependent

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

  Was this answer useful?  Yes

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.

  Was this answer useful?  Yes


  • Sep 21st, 2010

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,

  Was this answer useful?  Yes

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.

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

  Was this answer useful?  Yes

jyoti arora

  • May 29th, 2011

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.

  Was this answer useful?  Yes


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

  Was this answer useful?  Yes


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

  Was this answer useful?  Yes


  • 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

  Was this answer useful?  Yes

anshul sharma

  • Mar 29th, 2012

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

  Was this answer useful?  Yes

mallikarjuna B

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

  Was this answer useful?  Yes


  • Jan 26th, 2015

C is procedure oriented language

Java is object oriented language

2)c supports pointers.

Java does not support pointers instead objects are used in java

  Was this answer useful?  Yes


  • Nov 3rd, 2015

Platform independent means that the code remains the same irrespective of the platform involved. Java has something called a Virtual Machine called JVM or Java Virtual Machine. What happens incase of Java is that the JVM once installed on any platform like Windows or OS X Can run the Java code without any alteration

  Was this answer useful?  Yes


  • Nov 7th, 2015

Thank you Sowdhaminya madam, its really easy to understand to me...

  Was this answer useful?  Yes


  • Nov 7th, 2015

Thank you Devi madam.

  Was this answer useful?  Yes

Ganesh Kumar

  • Nov 13th, 2015

If any program is called platform independent if and only if it has to satisfy two properties. They are:

1) The language must have data types & must have same amount of memory space irrespective of any OS.

2) The language must have some internal programs which will converts one format of one OS to another format of another OS..

  Was this answer useful?  Yes


  • Jun 28th, 2016

Java programs compiled in one platform can be executed in another platform without re-compiled it just installed JVM. Because it comes under the package jre which will contain JVM, Platform supporting file and libraries of Java.

Platform changes underlying architecture will change and process or code will be change.

While compiling Java program it will convert high level language to byte code. Byte code is also called as intermediate code or intermediate language.it will not generate with respect to underlying platform standard.it will generate with respect to JVM.

JVM will convert the codes into underlying platform standard.

  Was this answer useful?  Yes


  • Aug 28th, 2016

Platform independent means it can be used in any operating system. But I am confused that Java does not support DOS due to it contain 3 bits file extension and we cant store .java file format (.java means file extension and its minimum requirement to support or to store the file extension is 4 bits). Please somebody to clear my doubt..

  Was this answer useful?  Yes


  • Oct 23rd, 2016

What if anyone download and run C/C++ code in Turbo C downloaded for other OS (like Linux) but the code alteration is needed in this case for different OS but in Java we have to download JDK for particular OS and then run the same code without any alteration as JVM in the JDK will convert the java file into class file and the class file is interpreted into machine code by JVM.

This is the only difference between Java and C/C++ in this context (platform independent)

  Was this answer useful?  Yes

Sandeep Kumar

  • Feb 13th, 2017

Java is platform independent language and independent for any operating system. You can write your code at one place and execute on different place.
Ex: Write code on Window OS and execute it on Linux OS.

Why Independent:
When we execute the source code its generate .class file compressing the byte code. Byte code easily interpreted to JVM (Java Virtual Machine). JVM easily install in your system automatically during installing JDK. It will download according your operating system. So we can say JVM is platform and OS dependent but Java is platform independent.

  Was this answer useful?  Yes

Gourav kumar

  • Mar 4th, 2017

First of all, I want to tell what is platform?
Platform mean your OS and Processor, basically in C and C++ the compiler is platform dependent because we know that each OS configuration is different so TurboC or TurboC++ different for all OS. So in C and C++ when program is compile each OS compiler convert that code into machine/executable code which is run by OS and each OS have a different executable code accept but in Java, its compiler convert source code into byte code, it is a intermediate code. JDK , JRE and JVM are platform dependent because each OS configuration is different but each java compiler create byte code and JVM in all OS interpret only byte code and convert it into machine/executable code according to OS and run it.

  Was this answer useful?  Yes

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