using varargs I can also check if a group of numbers are ranged from
big to small.
something vb.net has : if n1<n2<n3
in java you had to do : if (n1<n2)&&(n2<n3))
moreover with more numbers the work increases, so...
kuchiyouse no jutsu :
:hkn:
big to small.
something vb.net has : if n1<n2<n3
in java you had to do : if (n1<n2)&&(n2<n3))
moreover with more numbers the work increases, so...
kuchiyouse no jutsu :
Code:
public static Boolean bigTosmall(int... a)
{
for (int i = 0; i < a.length - 1; i++) {
if (!(a[i] > a[i + 1])) {
return false;
}
}
return true;
}
:hkn: