for (double i=1;i<=a;i++)
boolean value= b==a;
This method is true when i=5 but false otherwise. So the value can be true at i=5 but my program will print for me : false-false-false-false-TRUE-false-false-false... how can I make this program to print just TRUE for me. PS: I know that false or false or TRUE or false = True.. but how can I use it in the for loop? I cannot understand this code. I've also tested it and can never get a true out of this. b cannot ever equal i. Am I missing something in the code itself?
以上就是Boolean and for loop JAVA的详细内容，更多请关注web前端其它相关文章！