OBJECT ORIENTED PROGRAMMING LANGUAGE || ABOUT PROGRAMMING IN JAVA



PROGRAMMING IN JAVA


Java was developed in the year 1995 by Sun Micro systems Sun Micro systems later this is owned by Oracle Corporation now Java we call it has and platform independent or write once run anywhere so going forward to all these things we will try to see what made the Java to come into an existence so what are the drawbacks which was there in the programming languages which made up to evolve a programming language something known as Java so before that we have to understand some of the basics with respect to computers now with respect to computer if I have a computer argue this computer is of 1985 now this is a machine that I was using in year 1985 what what does it computer consist of a transistor of you know a mouse something like this it consists of a keyboard so this is a computer so how does computer understand computers always understands things 1 or 0 you know it should be + or it should be - so now one important component and this computer's would be a processor the processor is the very important part of the computer now if I want the program if I want an output for 1 + 2 what should be the output it has to be 3 how do I give it to a processes so that I will get an output 3 how do I write it now I will write a simple C program I write a simple C program something like print F 1 plus 2 now when I compile this when I compile this I will get an awesomely level language code something like you know allocate alike 1 allocate. 


 Now we are assigning memorable memories allocate B now we are assigning memories now I'll try to add a plus B so this might not be the exact assembly level language program but when I say add a plus B this converts to 1 01 0 1 0 1 1 2 3 4 5 6 7 8 if it is an 8-bit machine and it gives to the processor as you the processor that I amusing is until now I get the output as 3 so this is a very basic flow now here we have a compiler which compiles the program we have an assembler so we have an assembler so the assembly helps us to compile the assembly level programming language into zeros and ones and it is executed on efficient now we have understood AC program if it has to give an output on an Intel processor way back in 1985 assuming this processor was powered by Intel we write a simple C program it compiles it converts to an assembly level language program now again an assembler helps us to compile to a machine level code now the machine level code is given to the processor we get the output now assume the same C program you want to execute or you want to have this assembly level language code to be executed on an AMD processor .

Sample java code is given below:





Something known as AMD processor now when you want to execute the same assembly level code on your AMD processor you think the instruction that we have used here the instruction that we have used here something it known as add a plus B would work on AMD processor it might work it might not work the assembly level programming languages is entirely dependent on the processor now the instruction that we write something on as a dateless B for the Intel processor may not work for the AMD processor now if I want such a program you know it adds two numbers and it gives me the output on any operating system or any processor what should I do is the question so on this question there was a new programming language that will introduce something known as Java so now what work is drawback we will try to recap it again and we will try to see what is the drawback because there in a programming language something like C which executes a native code based on the processes now we'll just recap what is the drawbacks and what needs to introduce a new programming language known as Java now I have a simple program something like print 1 plus 2 now I'll give it to the compiler I give it to the compiler now it generate as an lineal code or assembly level code it let it generates the assembly level code wherein it tries to allocate memory for a 1 so it tries to allocate memory b 4 to it tries to add a plus B and it calls the operating system to perform the operation now once this assembler would convert to 0 1 1 0 1 0 1 1 this is nothing but your machine put that execute on your Intel processor now if I want the same assembly the level code to work on if I want to same assembly level call to work on AMD processor do you think this works this will not work.


Now how to make it work there might be another instruction something known as add or addition here plus P now if you give this it converge to 0 1 1 1 1 0 1 so now you can see the difference you know the Machine level code in Intel might be different the machine level code that executes on AMD processor is different now this assembly level code is the basic elementary language for all software development now this assembly level code is specific to the processes now using this assembly level code you will not be able to execute the program son different processors now if I have this assembly level code now if I want to give it to an Intel processor this will work if I want to give this sale to the AMD processor you could not work again if I want to give this to the Linux operating system with probably IBM processor with IBM process sorry not work so now this was the problem that was there before the language Java when they introduced a new programming language something on  we came out of this problem now the code in the C programming language is always flat form dependent he code is always flat form dependent.


 So if you have an Intel processor the code or the assembly level language  built processors will be different for AMD processor it is entirely different wherein you write one simple program which you will not be able to run on other systems on the other processors so now in the second video we'll be seeing how the problem of platform dependency was solved in Java which is the major and the most important features something on a flat form independent now we call Java to be a platform independent so on this concept we'll be seeing how the Java is flat form independent how the Java programs can be executed on multiple machine if you are looking to learn something more than Java.

Post a Comment

1 Comments