/* 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 {
public static void main
(String[] args
) { obj = "teste";
obj = 10;
try {
obj = true;
System.
out.
println("Erro: double esperado, boolean encontrado!"); }
}
public static <E> E to(Class<E> classe) {
return classe.cast(obj);
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lIHsKCXByaXZhdGUgc3RhdGljIE9iamVjdCBvYmo7CgkKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgkJb2JqID0gInRlc3RlIjsKCQlTdHJpbmcgc3QgPSB0byhTdHJpbmcuY2xhc3MpOwoJCVN5c3RlbS5vdXQucHJpbnRsbihzdCk7CgkJCgkJb2JqID0gMTA7CgkJSW50ZWdlciBpdCA9IHRvKEludGVnZXIuY2xhc3MpOwoJCVN5c3RlbS5vdXQucHJpbnRsbihpdCk7CgkJCgkJdHJ5IHsKCQkgICAgb2JqID0gdHJ1ZTsKCQkgICAgRG91YmxlIGR0ID0gdG8oRG91YmxlLmNsYXNzKTsgLy8gRXJybyEKCQkgICAgU3lzdGVtLm91dC5wcmludGxuKGR0KTsKCQl9IGNhdGNoKENsYXNzQ2FzdEV4Y2VwdGlvbiBjY2UpIHsKCQkJU3lzdGVtLm91dC5wcmludGxuKCJFcnJvOiBkb3VibGUgZXNwZXJhZG8sIGJvb2xlYW4gZW5jb250cmFkbyEiKTsKCQl9Cgl9CgkKCXB1YmxpYyBzdGF0aWMgPEU+IEUgdG8oQ2xhc3M8RT4gY2xhc3NlKSB7CiAgICAJcmV0dXJuIGNsYXNzZS5jYXN0KG9iaik7Cgl9Cn0=