Question: Is Java Platform Dependent Or Not?

Why is Java platform dependent?

Java programs can run on any OS or processor.

This bytecode is sent to Java virtual machine (JVM) which resides in the RAM of any operating system.

JVM recognizes the platform it is on and converts the bytecodes into native machine code.

Hence java is called platform independent language..

Is class file platform dependent?

A Java class file is a file (with the . class filename extension) containing Java bytecode that can be executed on the Java Virtual Machine (JVM). … This makes Java applications platform-independent.

What is difference between C and Java?

C is a Procedural Programming Language whereas Java is an Object-Oriented language. C is middle level language while Java is high level language. C does not support threading on the other hand Java has a feature of threading.

Is there pointers in Java?

No Pointer Arithmetic in Java. Pointers are memory addresses and a pointer points to a memory address of a variable. In C/C++, a pointer can be incremented/decremented to point to a new address but in Java, arithmetic operations on references are not allowed.

What is platform dependent?

Platform dependent typically refers to applications that run under only one operating system in one series of computers (one operating environment); for example, Windows running on x86 hardware or Solaris running on SPARC hardware. … Applications written in Java are a prime example.

Why Java is not fully platform independent?

Because Java compiles to bytecode that’s executed by its virtual machine, it can generally be expected to behave the same way regardless of the system sitting under the virtual machine. Differences in behavior can vary from JVM to JVM.

Is C machine dependent language?

A machine-dependent language works only on a specific computer system and its components. … C language is a machine independent language because no matter which machine one writes in, it can be run on any other machine.

Is Java 100% object oriented language?

Java is a OOP language and it is not a pure Object Based Programming Language. … Java is not because it supports Primitive datatype such as int, byte, long… etc, to be used, which are not objects.

Why C is a procedural language?

Procedure Oriented Programming Features in C: C language uses the set of instruction to inform/guide computer what to do step by step. Its depend on the procedures, more specifically routines or subroutines. As it follows the procedures, hence it adopts the top-down approach.

Why is C platform dependent?

C Compiler is platform dependent since it is closely linked to the OS kernel which is different for different OS. But over the years all OS’s come with pre-installed compilers and libraries that make it quite platform independent for basic programming. … This facility is not available with C.

Is C is a high level language?

A high-level language (HLL) is a programming language such as C, FORTRAN, or Pascal that enables a programmer to write programs that are more or less independent of a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages.

What is machine dependent language?

Machine dependent means the program can only work on the type of computer it was designed for while Machine independent means the program can work on any computer system. 1. Machine language is a first generation language written using 1s and 0s.

Why pointers are not used in Java?

Some reasons for Java does not support Pointers: Java has a robust security model and disallows pointer arithmetic for the same reason. … No pointer support make Java more secure because they point to memory location or used for memory management that loses the security as we use them directly.

Why Java is called portable language?

Java is known as a “portable language” because Java code can execute on all major platforms. What’s more, once you’ve compiled your Java source to “byte-code” .

Can Java run on any platform?

so,java runs on any operating system. … With Java, you can compile source code on Windows and the compiled code (bytecode to be precise) can be executed (interpreted) on any platform running a JVM. So yes you need a JVM but the JVM can run any compiled code, the compiled code is platform independent.