Learn Pain Less

HomeOur TeamContact
Java
How java is Platform Independent and Portable
Pawneshwer Gupta
Pawneshwer Gupta
January 02, 2015
1 min

Table Of Contents

01
Q. How Java is Porting ???
02
Why java is code safe ???
03
Interpreter (computing) is slower than compiler then why java use Interpreter ???
How java is Platform Independent and Portable

Q. How Java is Portable ???

A. Java is portable due to following features :

  1. Output of java code is in Bytecode (ie. Non Executable code).
  2. Bytecode is highly optimized set of instructions.
  3. Bytecode is executed by machine which is Java runtime machine is also call as JVM (Java Virtual Machine).
  4. Because output of java is in bytecode so its not possible to modify by malicious programs thats why java is secure.
  5. JVM is an interpreter.
  6. JVM takes bytecode as input and execute it.
  7. Output of java is in bytecode so we need to setup JVM on other platform which makes java Platform independent.
  8. When JVM is installed on any system then we can execute any java program.

Why java is code safe ???

  1. Java program is executed by JVM.
  2. JVM prevent program from external side effect.
  3. Their are few restrictions in java which increase safety of java.

Interpreter is slower than compiler then why java use Interpreter ???

  1. Its true that compilers are much faster than Interpreters.
  2. But java compiler generate program into bytecodes which is highly optimized.
  3. Execution of that optimized code is much faster than compilers. which makes java program faster even using Interpreters.

Subscribe to our newsletter!

We'll send you the best of our blog just once a month. We promise.

Tags

startcompilersinterpretersbytecode

Share


Pawneshwer Gupta

Pawneshwer Gupta

Software Developer

Pawneshwer Gupta works as a software engineer who is enthusiastic in creating efficient and innovative software solutions.

Expertise

Python
Flutter
Laravel
NodeJS

Social Media

Related Posts

Working with Files, Folders java
Working with Files, Folders java
March 25, 2015
1 min
Learn Pain Less  © 2024, All Rights Reserved.
Crafted with by Prolong Services

Quick Links

Advertise with usAbout UsContact Us

Social Media