



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




page 1
©Bruce Char and Vera Zaychik. All rights reserved by the author. Permission is given to students enrolled in CS361 Fall 2004 to reproduce these notes for their own use.
page 2
page 3
page 4
int big_array[100000]; ……
// now we don’t want to use the storage anymore big_array = null; // garbage collector // automatically deallocates storage from the // heap.
page 7
page 8
page 9
class Factorial{ Public static int compute(int k) throws BrucesArgumentNegativeException, other exceptions { if (k<0) throw new BrucesArgumentNegativeException(); else return 1; }
(and later in a program) …. try { System.out.println (“answer is: “ + Factorial.compute(n)); } catch(BrucesArgumentNegativeException e) { System.err.println(e + “oops”); continue; }; ….
page 10
page 19
page 20
page 21
0 1 2 3 4
stop
start (^) yield
sleep/suspend resume
stop/end run stop stop
dispatch
suspend
1 – terminated
2 – running
3 – suspended 4 - runnable page 22
page 25
page 27
page 37