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.

FinalInLoop.java 429B

12345678910111213141516
  1. import org.aspectj.testing.Tester;
  2. public class FinalInLoop {
  3. /** @testcase PR#709 PUREJAVA final assignment in loop */
  4. public static void main (String[] args) {
  5. for (int i = 0; i < 1; i++) {
  6. final String s;
  7. if (true) {
  8. s = "true";
  9. } else {
  10. s = "false";
  11. }
  12. Tester.check("true".equals(s), "s not true");
  13. }
  14. }
  15. }