We often use our laptop or computer to perform any operation or task but have you ever thought that how does computer understand our commands? Does really computer understand english or whatever language we have choosen? Well answer to this question is no because computer understands only machine language. Machine language is defined as,
" It is the language written using binary values 0 and 1. It is easily understandable to computer but not to programmer. "
It doesn't end here, if computer deems binary or machine language so how we get output in our choosen language. Here it gave birth to the concept of high and low level language. The language which computer understands is low level language while the language we understand is high level language.
Earlier, along with machine language, there was a language named assembly language especially in earlier processors. It was written using symbolic names such as ADD, SUB, etc. But now it has been replaced to machine language. So when it comes to Java so one question also arises that how does the high level language convert into low level so that computer may deem it and can give desire output? So it's answer is that it is converted using compiler and interpretor.
Compiler is defined as,
"It converts high level language into low level language by taking the whole source code into account"
Interpreter is defined as,
"It converts high level language into low level step by step and line by line."
So in java , we use platform to run it. That platform is known as JVM (Java virtual machine). Basically, I have explained the require information about java above. So now comes to class 10th java. Here we use either notepad or blueJ to do coding, so I will upload a video over how to use notepad and cmd for java and I have made video on blueJ already.
While performing operation of java in cmd we need some syntax to compile and interprete our file. So for that purpose we use javac class name. java for compiling and java class name for Interpretion and final running.
It is very tedious task to do java programming in cmd therefore we prefer bluej rather than cmd to do programming but everyone should be aware of the fact that this can be done on this also.
Java is the only language which have the facility of write once read anywhere provided you should have JVM on your computer.
Types of Programming
Although we are studying about OOP’s yet there are more types of programming which will use in java subsequently while doing programs of functions/methods.
1. Procedural Programming
2. Modular Programming.
Procedural Programming
When all the data is carried out in a procedure in the programming it is known as the procedural programming. When computer is given some specific task to perform in the form of a list, it performs all those tasks in a procedure which includes either in increasing order or the order which user wants. Like assume that you have given the responsibility of buying the articles and things for home and a list is given to you so what you will do you will go the concerned shop according to that list so what you did. You performed a procedural programming. This is what the procedural programming is. Like in all the government related work all the things are carried out in a procedure that the concerned paper will be firstly signed by this officer then that officer then it will go to court for reconfirmation. So this is the procedure it followed same in the java when we do programming we firstly make a class then main function then we write the code, so in a way it is the procedure we are following. We can’t write any code without a function.
Modular programming
When computer is given a large task to perform so it divides that task in number of modules and then act according to that this type of programming is known as modular programming. Assume that you are doing preparation for any competitive examination so this is a very large task you have withheld. So what you will do now you will make a time table and will resolve all the concerned subjects in parts to study so what you did you did modular programming. Simply in java when we have to make a programming we will divide the important works in that program into some functions and will make the program according to that.