1 /* This test case tests the thread joining for a JavaSTM library */
2 public class STM2 extends Thread {
6 public static void main(String[] st) {
16 for(i = 0; i < 4; i++) {
18 at5[i].team = new People[2];
19 at5[i].team[0] = new People();
20 at5[i].team[1] = new People();
21 age = new Integer(35);
22 at5[i].team[0].age = age;
23 at5[i].team[1].age = age;
25 b = at5[1].team[0].getAge();
28 System.printString("\n");
30 age = new Integer(70);
31 at5[1].team[1].age = age;
32 c = at5[1].team[1].getAge();
35 System.printString("\n");
36 System.printString("Starting\n");
37 for(i = 0 ; i< 4; i++) {
41 for(i = 0; i< 4; i++) {
45 System.printString("Finished\n");
52 ag = team[1].getAge();
57 System.printString("Gets Pension");
58 System.printString("\n");
60 System.printString("Gets No Pension");
61 System.printString("\n");
72 public People(Integer age) {
76 public void setAge(Integer a) {
81 return age.intValue();
84 public boolean isSenior() {
85 if(this.getAge() > 65)