Natta Pon

Greenhorn
+ Follow
since May 19, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Natta Pon

Because final variable will be init. when the class is first loaded, and still be there all the time.
So, inner class can see this final variable even method is finished.
Ken, You're right
First I though it should return "A". Then I try to compile this code and got result "B".
Because I miss the line 'as = name()' in class A that make result come out as you explain.

But I think variables are not shadowed.
If you change the line 'as = name();' to 'as = "A";'
This program will show "A" because attribute member of class cannot be polymophism
I think answer is d: too
String "When is a" in c: is on heap and will not be eligible.
However, I am not quite sure that
"When is a" + first
will be on heap?
Hello all

I have a EJB-QL statement, something like this one



student and teacher are both CMP Entity beans
but they are deployed in different jar files.
I want to put this EJB-QL in student bean finder method.

but how can I get access to teacher bean in another jar?

Thanks
Also,
If you want to see output as "Child here !"
You should call b.a.display().

or else, if you call b.display(), you just get inherited display() method from AnnonymousParent showing "parent"