The programming language Java compiles into an a intermediate form which is then executed by a Java interpreter. Alternatively, source code may execute within the language's interpreter. ( Machine language programs are translated using an assembler.) The resulting file is called an executable. Therefore, source code may be translated to machine instructions using the language's compiler.
Source code needs another computer program to execute because computers can only execute their native machine instructions.
In declarative programming, a computer program is a set of instructions.Ī computer program in its human-readable form is called source code. In imperative programming, a computer program is a sequence of instructions in a programming language that a computer can execute or interpret.