What is platform independent? | Sololearn: Learn to code for FREE!


What is platform independent?

8/3/2017 2:38:22 PM

Ashok Stp

5 Answers

New Answer


Assume object in real life, You my friend are an object. You know why? Because you have state, identity and behaviour. Either you sleep or awake- that's state, You are uniquely identified with your name/address etc- That's identity, You can cry, laugh or be rude- That's behaviour. So, the same in programming, An object is any entity which has a state, identity and behaviour.


When a certain app is developed without worrying about the size of the screen nor the operator. A good one for this is C++


Which simply doesn't depend on platform/OS. Like Java, We can execute Java program in any platform which have Java Development Kit installed in it, Unlike C/C++, which can only run in windows.


what is object?


Platform independent means it does not rely on a particular architecture or operating system. Java is said to be platform independent because an application written and compiled on a Windows machine will run on a mac, linux or any other system with the java runtime (JRE) installed. You do not require the Java Development Kit (JDK) to run a java program. The JDK is only required to develop java programs. Programs developed in C/C++ will only run on the same type of machine that they were developed for. A program written for Windows will not run on a mac or linux/unix system (we will ignore emulators and virtual systems here). I can assure you that C/C++ programs do not only run on Windows though. It is possible to write C/C++ programs that are portable at the source code level. This means that the same code can be compiled for multiple target systems but the resulting executables (apps or programs) will only run on their intended target.