K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Chan Ag wrote:I was not aware that compiling C.java would compile A.java and B.java too. Does that really happen? Does javac look for the class files or the source files. Now I'm really confused.
What do you mean by 'C.java is in the "default" package'? I don't have a package statement in C.java file. Would that mean it's in the default package?
I was thinking I should mention class path (-cp Desktop) so javac could find my com folder that contains test subfolder and then ClassFiles and then find A.class and B.class.
Should it be the .java files?
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Ramesh-X
Chan Ag wrote:Hi Tsang,
I read your response just now.
Yea, my folder structure is the same as what you've mentioned. Just I also had A.java and B.java in the Desktop folder. And no, I wasn't using an IDE specifically to test the imports and package subtelities ( for SCJP ).
Deleteing A.java and B.java from Desktop and then trying to compile C.java surprizingly worked. No idea, how... A.class and A.java are two different files right? And A.class was in the com.test.Classfiles folders anyway.. Pretty weird..
K. Tsang CEng MBCS PMP PMI-ACP OCMJEA OCPJP
Chan Ag wrote:Are you trying to say I talk out of the back of my head.
Chan Ag wrote:I'm sorry then. I misunderstood. I ain't good with idioms and I kinda suck at expressing and comprehending not too easy stuff. I know you were trying to help but .. just I misunderstood things..
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|