0% found this document useful (0 votes)
20 views5 pages

3 Day Core Java Classes

The document defines a program and the stages of a program. It discusses: 1) A program is a set of instructions that must be saved with a language extension like .c, .cpp, or .java. 2) The two stages of a program are compilation and execution. Compilation checks the rules and converts source code to compiled codes like object code or bytecode. 3) Execution runs the compiled codes to check for the required output. In C/C++, object code is converted to executable code while Java bytecode runs directly on the JVM.

Uploaded by

New king India
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
20 views5 pages

3 Day Core Java Classes

The document defines a program and the stages of a program. It discusses: 1) A program is a set of instructions that must be saved with a language extension like .c, .cpp, or .java. 2) The two stages of a program are compilation and execution. Compilation checks the rules and converts source code to compiled codes like object code or bytecode. 3) Execution runs the compiled codes to check for the required output. In C/C++, object code is converted to executable code while Java bytecode runs directly on the JVM.

Uploaded by

New king India
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Dt : 16/2/2023

*imp

define Program?(Syllabus)

=>program is a set-of-Instructions.

i
Note:

thi
=>After writing program,we have to save the program with language

extention.

ipa
Ex:

Test.c

Test.cpp
Ma
Test.java
sh
---------------------------------------------------------
ate

Stages of Program:

=>The program will have the following two stages:


nk

1.Compilation

2.Execution
Ve

1.Compilation:

=>The process of checking the program constructed according to

the rule of language or not,is known as Compilation process.

=>After Compilation process is Successfull,the sourceCode is


converted into Compiled codes.

=>C and C++ Programs will generate Objective Code and Java

Programs generate Byte code.

2.Execution:

i
=>The process of running Compiled codes and checking the required

thi
output is generated or not,is known as Execution process.

=>In c and c++ languages,while executing Objective Code internally

ipa
"loading and linking" process is perfomed and Objective Code
Ma
converted into Executable code and generate result.

=>In Java Language,the Byte code is executed directly on JVM.

(JVM - Java Virtual Machine)


sh
ate

Diagram:
nk
Ve
i
thi
ipa
======================================================

faq:
Ma
wt is the diff b/w
sh
(i)Objective Code
ate

(ii)Byte Code
nk

(i)Objective Code:
Ve

=>The compiled code generated from c and c++ programs is known

as Objective Code

=>while Objective Code generation OperatingSystem is participated,

because of this reason Objective Code is PlatForm dependent code


DisAdvantage:

=>Objective Code generated from one PlatForm cannot be executed

on other PlatForms

Note:

i
=>c and c++ languages which are generating Objective Code are

thi
PlatForm dependent languages.

----------------------------------------------------------

ipa
(ii)Byte Code:
Ma
=>The Compiled Code generated from Java Programs is known as

Byte Code.

=>While Byte Code generation Operating System is not participated,


sh
because of this reason ByteCode is PlatForm independent code.
ate

Advantage:
nk

=>The byte code generated from one PlatForm canbe executed on

all PlatForms based on JVM.


Ve

Note:

=>Java Language which is generating ByteCode is PlatForm

independent language
Diagram:

i
thi
ipa
Ma
sh
ate

=============================================================
nk
Ve

You might also like