Unfortunately, I cannot guess what compiler error you are getting. It could be one of several possibilities. Please be more specific. Post code and the error message between markers to preserve formatting.
Well for me, your code compiles and runs producing no output. I pasted your code (both classes) straight into a file called ReferenceCheck.java compiled it and ran the resultant class.