Click here to Skip to main content
16,009,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
how do we know java is interpreted language but c# is compiled language ?
Basic difference between interpreted language and compiled language ?

thanks in advance for replying
Posted

No, Java is not interpreted language. Java and all .NET languages are compiled languages, but the compilation is done into the byte code (one byte code for Java machine, another for .NET CLR, Common Language Runtime). In both variants, the byte code is translated to machine code during run time, using just-in-time compilation (JIT).

See:
http://en.wikipedia.org/wiki/Just-in-time_compilation[^],
http://en.wikipedia.org/wiki/Bytecode[^],
http://en.wikipedia.org/wiki/Managed_code[^].

Strictly speaking, being interpreted or compiled language is not a characteristic of a language itself, as a language can be interpreted and compiled at the same time. It makes the last question not quite correct, as the whole picture is more complex that assumed by this question. Some languages are interpreted only, as they are designed the way making compilation impossible. Discussion of this topic would leads us well beyond quick questions and answers. Understanding and classification of different languages need some of real education and deep understanding of programming, not something that could be conducted as a set of basic facts.

—SA
 
Share this answer
 
You don't. As far as your code is concerned, it can't tell that there is a difference - the instructions are executed in the same sequence whether the code is interpreted or compiled.

It is perfectly feasible to produce a compiler for a language that is normally interpreted, and vice versa. In fact, C# ()and other .NET languages blur the distinction by using JIT compilers and so forth.

Wiki has an article you probably should read: http://en.wikipedia.org/wiki/Compiler[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900