0% found this document useful (0 votes)
11 views29 pages

Lecture 2

Uploaded by

gjcoding29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views29 pages

Lecture 2

Uploaded by

gjcoding29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29




Java Program
Run below commands to generate all files:
gcc hello.c --save-temps
•This file contains the expanded source code. Any #include directives (like #include
<stdio.h>) are expanded, and the entire content of the included headers is visible here.
•You can open this file with any text editor to inspect the expanded code.
•This file contains assembly instructions, which are architecture-specific low-level
instructions.
•These assembly instructions are generated by the compiler and can be examined to see
the underlying low-level operations.









Java Bytecode:
• Compiled once, run anywhere.
• .class file is generated after compilation.

JVM (Java Virtual Machine):


• Bytecode interpreted or JIT compiled.
• Platform-specific JVMs execute bytecode on any OS.

Write Once, Run Anywhere (WORA):


• Bytecode is not hardware-specific.
• The same .class file runs on Windows, Linux, Mac, etc.

You might also like