2 - CMPSCI 187 Lecture #2 Java Overview 9 September 2011...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CMPSCI 187 Lecture #2 Java Overview 9 September 2011
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Java Overview • The Von Neumann Machine Model • Primitive Data in Java • Objects and Pointers • Arrays and Strings • Methods and Scope
Background image of page 2
The Von Neumann Machine Model • Most computers have a word size , home registers , other registers , and an instruction set . • These days 64-bit words can be numbers (fxed or Foating point), characters, pointers , or instructions. • An instruction normally either moves a word to or ±rom a register or carries out some operation on a word in a home register. • The program is a sequence o± instructions, with control Fow by branch and goto statements.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
High-Level Languages, Compilers, Interpreters • High-level languages like Java let us write programs without knowing the details of our machine, and give us a richer vocabulary of instructions. • A Java program (one or more classes) is compiled into class Fles. • When you run the program, an interpreter creates the machine-language program that the machine actually runs. • We give up some efFciency and some care in memory management by going to a higher-level language, but we make up for it in programming power.
Background image of page 4
Primitive Data • All data in Java eventually reduces to primitive values, usually stored in single
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

2 - CMPSCI 187 Lecture #2 Java Overview 9 September 2011...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online