If I cast an object as its superclass, then call a method that has been overrided 
in the child, will it call the method from the child or the superclass??
Such as:

public class TMHTTPDataObject
{
        String value = "";

        public void setValue(String _value)
        {
                value = _value;
        }

        public String getValue()
        {
                return value;
        }
}

public class TMHTTPDateField
{
        public void setValue(String _value)
        {
                value = dateConvert(_value);
        }
}

if( panelItems.elementAt(i) instanceof TMHTTPDataObject )
{
        TMHTTPDataObject temp = (TMHTTPDataObject) panelItems.elementAt(i);
        if( temp.getLinkedField().equals(_linkedField) )
        {
                temp.setValue(_value);
                break;
        }
}


Should getValue return the string straight up or the dateConverted string??

---
You are currently subscribed to jdjlist as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
http://www.sys-con.com/fusetalk

Reply via email to