3.2. Runtime Architecture

As mentioned earlier, both Java and C# differ from traditional languages such as C, C++, and Visual Basic because the code generated by Java and C# runs in a controlled execution environment. This execution environment provides infrastructure services such as memory management, security checks, and type validation to the compiled or interpreted code. Table 3.1 compares the runtime environments of Java and .NET.

Although the CLR and JVM look deceptively similar in their roles, you should note some key differences.

3.2.1. The JVM

The JVM runs only byte code, also called managed or safe code (code devoid of pointers).

Typically, a single JVM instance maps to a single operating system (OS) process. Multiple applications ...

Get .NET for Java Developers: Migrating to C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.