This document was written by CS 290W TA Joshua Kay and was last modified
The C and C++ Languages have been the languages of choice for programmers for many years. They result in programs in machine language, which is native to the machine the program runs on.Machine language is nothing but strings of zeroes and ones, all representing one thing at a time. These strings represent electrical/magnetic/optical impulses, which actually make the computer run. These 1/0 impulses can be combined to form integers in the binary system. Through special coding schemes, other types of information (characters, text, real numbers, graphics, and so on) can also be represented. It always comes down to binary numbers!
So, these "1's and 0's" make up binary numbers, which when executed create instructions understandable and executable by a computer.
No translation necessary, the computer understands the binary code, such as 001010110010 and can make sense of it.
It is extremely difficult for a human programmer to make sense of such statements, but software instructions are stored as data (essentially binary code) that is specific to a certain computer's Central Processing Unit (CPU).
The binary instructions for an Intel CPU are different than those for a Sun or a Macintosh, and this fact is the heart of the incompatibility issues that have plagued computing.
Programming Languages were devised to allow people to think in a logical manner and to construct algorithms to solve problems.
They consist of statements similar to English and mathematical notation:
Examples
for (counter = 0; counter <= NUM; counter=counter+1)
{...}
if (hours > 40)
{ pay=40*rate + (hours-40)*1.5*rate; }
How does the computer make sense of this? By using a compiler.
Compiler -- inputs programming language (source code), outputs machine language (object code)
However this new machine language is still system-specific to the machine it was compiled on!
ex: Write a C++ program on a Unix Sun Machine, and compile it. This program will not work on an Apple or PC unless it is recompiled on those machines. Chances are part of it might need to be rewritten also.
There has always been Programming Language Evolution. Why?
Evolution leads to production of languages that lead to greater productivity and reduction in cost of software development
C and C++ have been languages of choice for many software developers, due to their ease of use and powerful capabilities
However, C and C++ are both compiled languages which lead to native binary code, which cannot be transported across platforms
ENTER JAVA!