I am learning java. Is it possible to write code like this? what could be the possible value of <> to satisfy the condition ?
public class Test{
public static void main(String [] arg){
Integer i=(<>);
String s=(<>);
assert (Object)s== (Object)i;
}
}
>Solution :
There is only value that can be both an Integer and a String (technically it’s its own type).
Integer i = null;
String s = null;
assert (Object)s == (Object)i;