A In the context of programming languages what is a Portable

A) In the context of programming languages, what is a Portable program? B) Describe how Java supports portability.

Solution

A )

Poratable program are the program which can run in new environment without any major rework.portable program needs only to be compiled for the operating system to which it is being ported. However,this type of program uses standard interfaces and sometimes use operating system extensions for special capabilities/functions.

Portability usually mean to run/work when moving an application program to another operating system. So, in Java programming language and runtime environment has made it possible to have programs that run on any operating system that supports the Java standard. Java applets in the form of precompiled bytecode can be sent from a server program in one operating system to a client program (your Web browser) in another operating system without change.

B )

java supports portability this is only because of Java virtual machine (JVM). The JVM is an imaginary CPU for which most Java compilers emit code.This imaginary CPU is what allows Java programs to run without being recompiled on different CPUs. Nothing in the Java programming language requires Java source code to be compiled into code for the JVM instead of into orignal object code/source code.

1.Output of a Java compiler is Non Executable Code i.e Bytecode.
2.Bytecode is a highly optimized set of instructions
3.Bytecode is executed by Java run-time system, which is called the Java Virtual Machine (JVM) but every plateform or OS should have JVM to execute Bytecode.

A) In the context of programming languages, what is a Portable program? B) Describe how Java supports portability.SolutionA ) Poratable program are the program

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site