Why?  Really depends on what the datatype of obj really is.  If it's an
instanceof A, then it should return 0 because A does not implement any
interfaces and there are no public member classes.

Bob Tanner <tanner at real-time.com> writes:

> Having problems with Java reflection.
> 
> public class A {
>   public MyClassB myB;
>   public MyClassC myC;
> 
>   public void count(Object obj) {
>     Class myClass = obj.getClass();
>     Class[] publicClasses = myClass.getClasses();
>     System.out.println("Num public classes:"+publicClasses.length);
> }
> 
> That code snippet returns 0, shouldn't it return 2?
> 
> 
> 
> -- 
> Bob Tanner <tanner at real-time.com>       | Phone : (952)943-8700
> http://www.mn-linux.org                 | Fax   : (952)943-8500
> Key fingerprint =  6C E9 51 4F D5 3E 4C 66 62 A9 10 E5 35 85 39 D9 
> 
> _______________________________________________
> tclug-devel mailing list
> tclug-devel at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-devel

-- 
Jon Schewe | http://mtu.net/~jpschewe | jpschewe at mtu.net
For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39