This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 8.2 (Build 201609300101) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_92 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.92-b14 Reproducibility: Happens every time STEPS: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package javaapplication1; import java.util.Random; /** * * @author kurt */ public class JavaApplication1 { /** * @param args the command line arguments */ public static void main(String[] args) { Noodle[] noodle = new Noodle[313]; // String word = "abcdefghijklmnop"; // String nib; int toss; Random rand = new Random(); int i; for (i = 0; i < 313; i++) { noodle[i] = new Noodle(0); } for (i = 0; 1 < 9; i++) { for (int k = 0; k < 20; k++) { int value = rand.nextInt(313); noodle[value].dressed(1); } } for (i = 0; i < 313; i++) { Error on this line Code Unreachable Statement // System.out.println(String.format("%s %s", i, noodle[i].coated())); } } } ACTUAL: unreachable Statement EXPECTED: If I move the statement block up into the the preceding for loop the error goes away but that is not the program flow I wanted. I have tried delleting all spaces and the the two closing brackets and recreating them but that doesn't help either. I beleive this to be a bug.
Created attachment 165511 [details] IDE log
(In reply to mrkite.2 from comment #0) > for (i = 0; 1 < 9; i++) { IDE is right because loop is infinite.