Java
is a structured, object-oriented language derived from c++. Java achieved
portability by translating the program’s source code into an intermediate
language called bytecode. This bytecode was then executed by the Java Virtual
Machine (JVM). Therefore, a Java program could run in any environment for which
a JVM was available.
The creation of C#:
Features
that lack Java:
- Cross-language interoperability, also called mixed-language programming.
This
is the ability for the code produced by one language to work easily with the
code produced by another.
- Full integration with the windows platform.
Although
Java programs can be executed in a windows environment (assuming JVM has been
installed), Java and Windows are not closely coupled.
To
overcome the above mentioned, Microsoft developed C#. From C, C# derives its
syntax, many of its keywords and operators. C# builds upon and improves the
object model defined by C++.
How the Common Language Runtime Works
The
Common Language Runtime (CLR) manages the execution of .NET code. When you
compile a C# program, the output of the compiler is not executable code.
Instead, it is a file that contains a special type of pseudocode called
Microsoft intermediate Language (MSIL). MSIL defines a set of instructions that
are independent of any specific CPU. It is the job of the CLR to translate the
intermediate code into executable code when a program is run.
MSIL
is turned into executable code using a JIT (Just in time) compiler. When a .NET
program is executed, the CLR activates the JIT compiler. The JIT compiler
converts MSIL.
No comments:
Post a Comment