import java.util.*;
import java.lang.*;
class Main
{
{
System.
out.
println(allInstanceOf
(String.
class,
"aaa",
"bbb")); System.
out.
println(allInstanceOf
(String.
class,
"aaa",
123)); }
public static boolean allInstanceOf
(Class
<?> cls,
Object...
objs) { if (!cls.isInstance(o)) {
return false;
}
}
return true;
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVN5c3RlbS5vdXQucHJpbnRsbihhbGxJbnN0YW5jZU9mKFN0cmluZy5jbGFzcywgImFhYSIsICJiYmIiKSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKGFsbEluc3RhbmNlT2YoU3RyaW5nLmNsYXNzLCAiYWFhIiwgMTIzKSk7Cgl9CiAgICAKICAgIHB1YmxpYyBzdGF0aWMgYm9vbGVhbiBhbGxJbnN0YW5jZU9mKENsYXNzPD8+IGNscywgT2JqZWN0Li4uIG9ianMpIHsKICAgICAgICBmb3IgKE9iamVjdCBvIDogb2JqcykgewogICAgICAgICAgICBpZiAoIWNscy5pc0luc3RhbmNlKG8pKSB7CiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIHRydWU7CiAgICB9Cn0=