Casting / Inheritance Problem

Jon Beniston jon@sentinelware.freeserve.co.uk
Sat Apr 1 00:00:00 GMT 2000


Hi,

I was messing aroung the other day with the following code:

...
Object o = System.getSecurityManager();
...

When compiling GCJ emits:

Test.java:7: Incompatible type for declaration. Can't convert
`java.lang.SecurityManager' to `java.lang.Object'.
                Object o = System.getSecurityManager();
                       ^

Any thoughts?

Jon.




More information about the Java mailing list