I cant get a basic for loop to work java 8 -
I cant get a basic for loop to work java 8 -
i testing out loops , when seek doesn't work:
public static void main(string[] args) { for(int i=0;i==5;i++){ system.out.println(i); } }
when run expect "0,1,2,3,4,5" nil other "build successful". i'm using netbeans 8.0 on ubuntu linux. help or explanation why appreciated.
edit:*facepalm
in java for
loops, while
loops, don't specify "break", instead "continue" condition. thus, should replace ==
<=
.
java
Comments
Post a Comment