Object variable

I am new to java.

If I have a class Adder with two properties num1 & num2

so I do

Adder A=new Adder();

A.setnum1(5);

A.setnum2(3);

Object obj=new Object();

obj=A;

my question is how can I get the value of num1 and num2 from variable obj

thanks in advance

[319 byte] By [SandScrappera] at [2007-11-27 11:55:33]
# 1

See the ill-named section "Casting Objects" (casting references would have been better):

http://java.sun.com/docs/books/tutorial/java/IandI/subclasses.html

CeciNEstPasUnProgrammeura at 2007-7-29 19:02:37 > top of Java-index,Java Essentials,New To Java...