Programing Languages
Previously we use machine language to write a program. machine code is a language that machines can understand and language use 1 and 0 indicate command and for humans machine language is hard to memorize.As an alternative for machine language people use assembly language. assembly language is a one step improved version of machine language but for humans. in assembly language people use words instead of 1 and 0 but it has limited words and those words also not very friendly for peoples.
Then people invented programing languages that use actual english words to write a program. But then there is one problem machines can't understand human languages. So people create compilers to convert human friendly programing language to language that machines can understand which is machine language.
Basic features of programing languages
- Compiler - for compile program that write in human language to language that machine can understand.
- Syntax to write code.
- Pre build code library.
Types of programing languages
- C - (1972)
- C++ - (1998)
- JAVA - (1995)
- C# - (2002)
How is compiler works
Every compiler works depend on OS type. If compiler is in windows it will compile source code to work on windows os. if compiler is in linux it will compile source code to work on linux os.
but JAVA should work right? because java is not depend on OS. it's a OS independent language.
but if we use JAVA to write our program JAVA compiler will create a bytecode file. bytecode files are not with any OS.
Then how is JAVA program run on a computer. because as we can see bytecode not working with any OS.
JAVA has a different software call JVM (JAVA Virtual machine). For every OS there is a compatible JVM and inside most of the OS comes with JVM pre installed. This JVM is the one who run bytecode created my JAVA compiler.
When we run JAVA bytecode, that bytecode run inside JVM. JVM is the one who pass information to OS about JAVA program we have(bytecode) and also JVM managing other things related to java programing.
In next one let's discuss about JAVA programing language.
Comments
Post a Comment