Yeah I know it wont compile because I compiled it. LoL.
Anyways Im trying to get int myClass in MyClassC to print in MyClassB (which I got to do) but now I want to print it three times in MyClassA. I realize the code itself is probably all messed up but im a newbie so forgive me.
I've spent hours rewriting and researching to get the code to work. But I'm getting frustrated so any help would be appriciated. Thanks.
posted 11 years ago
I see, I thought you had some other issue and just messily copied the code. I would suggest starting with The Java Tutorial to learn the basic syntax and concepts. The two things that jump out at me are your misspelling of "MyclassB" (it's an upper case C, Java is case sensitive) and that you're trying to create a new MyClassA without using the keyword. In fact, if you fix those two things I'm not noticing anything else wrong with it.