You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArrayInc2CE.java 537B

123456789101112131415161718
  1. /**
  2. * @testcase PR#715 PUREJAVA incrementing objects, arrays
  3. */
  4. public class ArrayInc2CE {
  5. public void testObjectIncrementingCE() {
  6. boolean b;
  7. int i = 0;
  8. Object object = new Object();
  9. int[] ra = new int[]{};
  10. ++ra; // CE prefix ++ cannot be applied to int[]
  11. ++object; // CE prefix ++ cannot be applied to Object
  12. ra++; // CE postfix ++ cannot be applied to int[]
  13. object++; // CE postfix ++ cannot be applied to Object
  14. }
  15. }