'It was designed to make things Flexible.' To allow developer writing code that would run on any machine irrespective of its architecture(i.e. x86, MIPS etc) or platform(i.e. Windows, macOS, Linux etc).
Actually, at that days, languages like c++ was running in a limited space.
I am addressing them as 'in a limited space' because when code compiles through c++ compiler, it outputs a machine code according to their hardware configuration and OS specific. It means if we change hardware configuration or OS then we need to change the code and this really not sounds good.
Then Java came to overcome this.
Java was intelligent enough, It was not playing with that machine code, It creates own machine(JVM) and owns machine code(Bytecode). Now sounds good. So now Programmer just install JVM on a computer and start without any care of dependency.
Conclusion: At the time of C++ there was we need to change the code according to the machine and at the time of Java we need to change the JVM according to the machine and the good news is that different JVMs for different machines are available so developers have no need to give extra effort to change the code.
Actually, at that days, languages like c++ was running in a limited space.
I am addressing them as 'in a limited space' because when code compiles through c++ compiler, it outputs a machine code according to their hardware configuration and OS specific. It means if we change hardware configuration or OS then we need to change the code and this really not sounds good.
Then Java came to overcome this.
Java was intelligent enough, It was not playing with that machine code, It creates own machine(JVM) and owns machine code(Bytecode). Now sounds good. So now Programmer just install JVM on a computer and start without any care of dependency.
Conclusion: At the time of C++ there was we need to change the code according to the machine and at the time of Java we need to change the JVM according to the machine and the good news is that different JVMs for different machines are available so developers have no need to give extra effort to change the code.
really nice one article
ReplyDeleteWow sir excellent. I love java
ReplyDelete