1) Compile Error: Methods in Base not found 2) Compile Error: Unable to access protected method in base class 3) Compilation followed by the output "amethod" 4)Compile error: Superclass Class1.Base of class Class1.Class1 not found
Ans given is 4 but i cheked ,it compiles & runs fine with o/p amethod.Shouldn't the answer be 3? Thanks Veena [ Jess fixed the code so you can actually read it, please be more careful when cutting and pasting code so that we can read it and help! ] [ October 20, 2003: Message edited by: Jessica Sant ]
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
Joined: Aug 25, 2003
Hi Veena, can you make it more readable? I had hard times reading the code. These classes are in different packages, Base.java is marked as default access, and, to make things worse, package Base is not imported into Class1.java. This shouldn't compile. P.S. Thanks Jess, I thought it was local on my computer. [ October 20, 2003: Message edited by: Vad Fogel ] [ October 20, 2003: Message edited by: Vad Fogel ]
Joined: Jun 20, 2002
Oh!I got it.Thanks and really sorry for pasting code as it is. Thanks Veena