SYSC 3303 Lecture Notes - Lecture 4: Trivial File Transfer Protocol, Attachmate, Uniprocessor System
Document Summary
* maximum block number = 216 - 1 = 65535. Thus, max file size = 65535 x 512. The java garbage collector is a daemon thread: example: class factorial extends thread { private jtextarea transcript; public factorial(string name, jtextarea transcript) { super(name); this. transcript = transcript; public void run() { = " + factorial + "\n"); for (int n = 1; n <= 20; n++) { // sleep for between 0 and 2 seconds. = n * (n-1)! factorial = n * factorial; transcript. append(n + "! = " + factorial + "\n"); transcript. append(thread. currentthread() + " finished\n"); Class threadexample1 { public static void main(string[] args) { It has a two-argument constructor: public factorial(string name, jtextarea transcript: the first argument is the thread"s name, which is passed to superclass constructor. Thread. run() invokes the runnable object"s run() method: class relationships: Implementing the runnable interface run() has no parameters and does not return a value run() must never be explicitly invoked from within the program.