In every programming language we all come across different words which we cannot understand or it becomes difficult for us to have a clear image of that word in our mind
Today I am discussing some of those words so that all of you can understand it in a better way.
SOURCE CODE :-
The programmer who is typing a code for some purpose or we can say that to achieve a particular task, that code is called a source code.
In simple words if you are typing a code for the addition of two numbers then you are typing a source code.
Let me illustrate this with an example:
Class Ex
{ public static void main(String [] args)
{
int a=10,b=20;
System.out,println("addition of two number is" +(a+b));
}
}
Don't worry about the syntax it is just a sample code, in the upcoming posts I will teach you how to write a java code. Here I am just explaining that this is called a source code.
COMPILED CODE :-
You must have heard about the term compiler, what is a compiler ? what are its functions ? what does it do ?
Every programming language has its own compiler, the function of the compiler in java is to convert the source code into byte code or compiler generated code. This byte code is called as compiled code.
Take an above example of Class Ex, when the compiler will compile it , it will generate a byte code for this and this byte code will be later executed by JVM.
EXECUTABLE CODE:-
Now the code which is ready to be get executed i.e. compiler generated code or byte code is called executable code. The executable code is generated from compiled code. It is genrally .exe, bin file.
COMPILATION:-
You are having an idea that is what is a source code and what is compiled code. The process of converting the source code to the compiled code is called compilation. After compilation a .class file is generated by the compiler.
Ex.java----------> Ex.class
EXECUTION :-
Running the compiled code to get the output is called execution. This phase comes after the compiler has generated the byte code. The .class file which was generated by the compiler is now executed and the output is generated.
Ex.class-----------> OUTPUT
COMPILER:-
I don't think so that now I have to explain much about this term. Actually it is a translator software and it converts the source code into the compiled code and complete code is compiled at a time.
INTERPRETER :-
This is probably a new term. This is also a translator software which converts source code to the compiled code but part of the code time by time i.e. it is does not translate the whole code at a time , while translating if it founds any error it stops the translation and gives the message to the user. Generally interpreter is used for the execution purpose.
Title :
JAVA : COMMON TERMINOLOGIES IN JAVA
Description : In every programming language we all come across different words which we cannot understand or it becomes difficult for us to have a clea...
Rating :
5