+/EE360P
distributed systems
git clone https://git.julia.blue/+/EE360P
828c852
master
1class Foo { 2String name ; 3public Foo (String s ) { 4name =s ; 5 } 6public void setName (String s ) { 7name =s ; 8 } 9public String getName () { 10return name ; 11 } 12} 13class FooBar extends Foo implements Runnable { 14public FooBar (String s ) { 15super (s ); 16 } 17public void run () { 18for (int i =0 ;i <10 ;i ++) 19System .out .println (getName () +": Hello World" ); 20 } 21public static void main (String []args ) { 22FooBar f1 =new FooBar ("Romeo" ); 23Thread t1 =new Thread (f1 ); 24t1 .start (); 25FooBar f2 =new FooBar ("Juliet" ); 26Thread t2 =new Thread (f2 ); 27t2 .start (); 28 } 29}