Java uses of for loops?


int points= 0;
for (int i = 6; i >= 1; i--) {
	if (Collections.frequency(list, i) >= 3) {
		points= i * 3;
		return points;
return points;

Is this the right way to find three equal numbers in a list. I am making a yatzy game. Is it the right way of using a for loop or should I use a while loop?


Is it JavaScript code? It looks like Java. You need to ask your question at Java forum.


Ok sorry, I am new here so I am not sure were to find the right forums.



So can you answer the question now? "poƤng" should say "points".


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.