tjsetter.java 343 B

12345678910111213141516171819
  1. import org.freepascal.test.jsetter.*;
  2. public class tjsetter {
  3. public static void main(String[] args)
  4. {
  5. tjsetterchild c;
  6. c = new tjsetterchild();
  7. c.SetVal(2);
  8. if (c.get() != 2)
  9. java.lang.Runtime.getRuntime().exit(1);
  10. c = new tjsetterchild2();
  11. c.SetVal(2);
  12. if (c.get() != 1)
  13. java.lang.Runtime.getRuntime().exit(2);
  14. }
  15. }