Submitted by: Submitted by agnesssskim
Views: 18
Words: 4971
Pages: 20
Category: Science and Technology
Date Submitted: 04/01/2015 02:41 AM
*
* January 13, 2015
3.5 Book notes
compiled language: converted to machine language before running the program by using a translator called a compiler
compiler: piece of software that checks the syntactical and semantic structure of the program
examples C C++
programs run several times, but only has to compile once
interpreted language: NOT converted to machine language form but instead uses the interpreter to analyze the program
every time the program is executed repeatedly it is reinterpreted each time
even though the program isn’t converted into machine language form, the interpreter needs to be expressed in machine language form to run on the specific processor
instead of translating from one language to another, the compiled converts the program from high level language to machine language for the processor to run
however if the program is on a different processor then you would need to compile again
advantage to the compiled approach is speed b/c the translation to machine language is done once before the program or order is placed
advantage to the interpreted approach is flexibility because you can order with different languages, but this is lower because if you order the same thing the translation must take place all over again
3.5.1
the Java compiler produces a code called bytecode for a hypothetical computer called Java Virtual Machine
the JVM has an instruction set and manipulates various memory areas at run time
the compiler places the bytecode to be interpreted by the JVM into a class file THEN the JVM interprets the bytecode in the class file to execute the program
there are separate class files
for JVM to run, it must be able to locate the class file with the bytecode
JVM uses an envio variable named CLASSPATH to help it search and locate the class file for the program to run
Class notes 1/14/2015
Types: values, safety net idea, wants to know what you are dealing with, operations that you can apply to a program, specific...