Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Language
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 24-Jul-11 19:26pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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[^]
  Permalink  

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

  Print Answers RSS
0 Dnyaneshwar@Pune 1,300
1 Sergey Alexandrovich Kryukov 802
2 Tadit Dash 305
3 ravikhoda 300
4 OriginalGriff 292
0 Sergey Alexandrovich Kryukov 11,441
1 OriginalGriff 6,930
2 Peter Leow 4,850
3 Abhinav S 3,838
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web01 | 2.8.140421.2 | Last Updated 25 Jul 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid