For example let assume that I defined set of 5 integers.
int a = 5;
int b = 7;
int c = 8;
int d = 9;
int e = 10;
Now on the fly i receive five values a1,b1,c1,d1,e1. These can have any values but not limited to the ones i defined.
I want to return true if at-least 3 values i received on fly matches with the ones i defined.
Public String atleastThreeMatches(){
(a1=a && b1 = b && c1 = c) || .....
}
Doing something like above wont be feasible, if i have to match large number of values.
Is there a function in Java or anything which can accomplish this?