Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

FinalConstructorParm.java 393B

123456789101112
  1. import org.aspectj.testing.Tester;
  2. public class FinalConstructorParm {
  3. int i;
  4. public FinalConstructorParm(final int i) { // bad compiler error here - not in 10b1
  5. this.i = i;
  6. }
  7. public int lessOne() { return i-1;}
  8. public static void main(String[] args) {
  9. Tester.check(1== (new FinalConstructorParm(2)).lessOne(),
  10. "final failed");
  11. }
  12. }