Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
againstthegrain
againstthegrain's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
boolean method
[4 Replies]
18-Jun-2012 10:25 PM
Forum:
Programming Questions
I'm trying to find what's wrong with this method, but can't- Processing gives me an error saying that the return type must be boolean... but it is, isn't it?
boolean inArray(int num, int[] ary) {
boolean free = false;
for(int i=0; i < ary.length || free; i++) {
if(num == ary[i]) {
free = false;
}
else {
free = true;
}
return free;
}
}
«Prev
Next »
Moderate user : againstthegrain
Forum