run:package text;
public class run {
public static void main(String[] args) {
// TODO Auto-generated method stub
t a=new t();
a.set("hello word");
String str=(String)(a.get());
System.out.println("Value is "+str);
}
}
Runs:package text;
public class Runs {
public static void main(String[] args) {
// TODO Auto-generated method stub
t b=new t();
b.set(new Integer(123));
Integer a=(Integer)(b.get());
}
}
t:package text;
public class t {
private Object value;
public Object get()
{
return value;
}
public void set(Object x) {
value =x;
}
}