You need to compile A before B and B before A so because the compiler needs to know the structure of a class before it can generate code to invoke its methods.
Javac gives you a way out of this. You compile both classes at once on the command line and in some unspecified amazing way, the compiler sorts the problem out for itself, e. g.
rem compiling a circular reference javac.exe A.java B.java
This page is posted |
http://mindprod.com/jgloss/circularreference.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\circularreference.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.14.246.52] |
| |
Feedback |
You are visitor number | |