Java is not machine dependent. High-level Java source code is compiled against the JVM which produces Java byte code, the lower-level native language of the JVM. At runtime, the JVM interprets the byte code to produce the required machine-dependent code. Every platform that supports Java has its own JVM, thus the same byte code can execute upon any supported platform. The translation from byte code to machine-dependent code is handled solely by the platform JVM.
Chat with our AI personalities
The Java programming language is platform independent - it will run on any hardware and operating system which has a Java Virtual Machine installed.
The JVM itself, however, is platform dependent - meaning, that to build and run the JVM (not a Java program, but the JVM itself), the quirks and details of the particular hardware/OS combination need to be known, and that a binary produced from the JVM source code will be tied to run only on that specific hardware/OS combination.
When speaking of Java overall, however, the correct term to use is "platform independent".
AnswerJava is platform independent while JVM is platform dependent. In Java ,you can compile code in to class file and you can run it in any OS without altering your code.But for interpreting class to bytes we need JVM .so it act as a bridge between your class file and OS. Now a days JVM is available for all OS.So Java attains platform independent.AnswerDepending on your definitions, no language may be truly platform independent. A language like Java needs a virtual machine to run the platform independent bytecode. But this virtual machine must run natively on a given physical machine, which means that the JVM in platform dependent. If someone tells you that Java is not completely platform independent, this is probably what they are referring to.
True. Java source code is called "platform independent" because it runs on top of the Java Runtime Environment (JRE). In order for this to work, a special JRE must be created for the platform you want to run a Java program on.
java also called as platform independent.because we will use java application at any operationg system and any hardware. it not contain error. so we called java as platform independent..
by creating a jre spesific to each platform programmers can confidently write code in any platform and assume it willl also work in aany other. theirfore java is platform independent as bytecode would look the same on any platform, however will be implemented by a diffrent interpreter for each platform.
java is platform independent language and open source. java is object oriented language.