Why is Java both interpreted and compiled language?

Programming languages are classifies as

  • Higher Level Language Ex. C++ , Java
  • Middle Level Languages Ex. C
  • Low Level Language Ex Assembly
  • finally the lowest level as the Machine Language.

A compiler is a program which converts a program from one level of language to another. Example conversion of C++ program into machine code.

The java compiler is a convert’s high level java code into bytecode (which is also a type of machine code).

A interpreter is a program which converts a program at one level to another programming language at the same level. Example conversion of Java program into C++

In Java , the Just In Time Code generator converts the bytecode into the native machine code which are at the same programming levels.

Hence java is both compiled as well as interpreted language.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s