/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int[] number = {1, 2, 3, 4};
if(contains(number, 5)){
System.
out.
println("Contem o numero 5"); }else {
System.
out.
println("Nao contem o numero 5"); }
}
public static boolean contains(final int[] array, final int v) {
boolean result = false;
for(int i : array){
if(i == v){
result = true;
break;
}
}
return result;
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgICAgIGludFtdIG51bWJlciA9IHsxLCAyLCAzLCA0fTsKCiAgICAgICAgaWYoY29udGFpbnMobnVtYmVyLCA1KSl7CgkJCVN5c3RlbS5vdXQucHJpbnRsbigiQ29udGVtIG8gbnVtZXJvIDUiKTsKCQl9ZWxzZSB7CgkJCVN5c3RlbS5vdXQucHJpbnRsbigiTmFvIGNvbnRlbSBvIG51bWVybyA1Iik7CgkJfQoJfQoJCiAgICBwdWJsaWMgc3RhdGljIGJvb2xlYW4gY29udGFpbnMoZmluYWwgaW50W10gYXJyYXksIGZpbmFsIGludCB2KSB7CgogICAgICAgIGJvb2xlYW4gcmVzdWx0ID0gZmFsc2U7CgogICAgICAgIGZvcihpbnQgaSA6IGFycmF5KXsKICAgICAgICAgICAgaWYoaSA9PSB2KXsKICAgICAgICAgICAgICAgIHJlc3VsdCA9IHRydWU7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHJlc3VsdDsKICAgIH0KfQ==