Is it not because you are passing an instance of a super class while it
expects an instance of a derived class?

- Venkat


On Fri, 4 Feb 2005 17:28:45 +0100, Michael Schuerig <[EMAIL PROTECTED]> wrote:
> 
> Try to compile this:
> 
> package test;
> 
> import org.apache.axis.constants.Style;
> 
> public class ConstantsVsEnum {
>    public static final Style myStyle = Style.DOCUMENT;
> 
>    private static void styleTaker(Style style) {
>    }
> 
>    public static void main( String[] args ) {
>        styleTaker(myStyle);
>        styleTake(Style.DOCUMENT);
>    }
> }
> 
> These are the errors you'll probably get:
> 
> test/ConstantsVsEnum.java:7: incompatible types
> found   : org.apache.axis.enum.Style
> required: org.apache.axis.constants.Style
>    public static final Style myStyle = Style.DOCUMENT;

Reply via email to