javaclass

tests/StaticTest.java

131:b220be071851
2005-01-18 Paul Boddie Fixed signed constant loading in bipush and sipush.
     1 public class StaticTest {     2      3     public static StaticTestClass staticMember = StaticTestClass.newInstance();     4     public static StaticTestClass staticMember2 = StaticTestClass.newInstance(123);     5     public static int staticMember3 = StaticTestClass.getNumber();     6 }     7      8 class StaticTestClass {     9     public int x;    10     11     public StaticTestClass() {    12         x = 321;    13     }    14     15     public StaticTestClass(int x) {    16         this.x = x;    17     }    18     19     public static StaticTestClass newInstance() {    20         return new StaticTestClass();    21     }    22     23     public static StaticTestClass newInstance(int x) {    24         return new StaticTestClass(x);    25     }    26     27     public static int getNumber() {    28         return 456;    29     }    30 }