Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Project {
- Person[] participants; }
- class Person {
- int id;
- boolean participate(Project p){
- for(int i = 0; i < p.participants.length; i + +) {
- if (p.participants[i].id == id)
- return(true); }
- return(false); } }
- ... if (x.participate(p)) ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement