•Flow control: which line
executes next?
•Command java Foo starts execution in main method
in class Foo (files Foo.java, Foo.class)
•Java executes statements in
order
–(statement ends with ‘;’, usually one per line)
•Sequential order changes
when
–a message is sent, invoking a
method elsewhere
–code reaches end of a loop body ( e.g. while)
–if - else
logic skips statements
–