Wednesday, 23 May 2018

Why java is platform independent

Fist know about platform independent :

  • java is platform independent because of Bytecode(i.e byte code is machine understandable code  of jvm(java virtual machine)
  • The process of java bytecode execution:

simple.java  javac(simple.class)→jvm(simple.obj)→display final output

  • Source code is used by java compiler and converted that code in .class file and the class file code is in byte code form and that  class file is used by jvm and again to convert into object file and then after display final output on the screen

  • java is platform independent language because we can run .class file in any operating system like(MAC,LINUX AND WINDOWS)

  • jAVA compiler converts source code to bytecode and bytecode is not designed for a specific operating system understandable.

  • JVM reads bytecode and translate bytecode to specifc operating system understandable form.

  • bytecode are also known as jvm understandable code or intermediate code .

  • bytecode is remain same in all operating system it doesn't care about any operating system at all.




No comments:

Post a Comment