Namith Kumar

Greenhorn
+ Follow
since May 20, 2009
Namith likes ...
Eclipse IDE Java Mac OS X
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
14
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Namith Kumar

Thanks Jean. Now i get it . Since reference variable deer is defined as type Deer (parent class) and the hasHorns method in Deer is declared as private , at compile time , this will get resolved to the hasHorns method of the parent Deer class. There will no chance of overriding since the method is declared private . It looks like JVM does not bother to check the run time reference if a similarly named method is present.


This prints DeerReinDeer,false.  
I understand why it prints DeerReinDeer (fist invoke super() and then the sub class ReinDeer constructor). Can you help me understand why it prints the false ? Since the reference variable deer is pointing to the ReinDeer object , i was expecting it to invoke the hasHorns method in ReinDeer and print true. I know the fact that hasHorns is declared private in Deer has something to with it (i change that modifier to public and it did print true), but not sure why.
Hey Josh, Thank you for stopping by. I am new to Java , but i have heard about your book and know its considered one of the best one's on the subject. I am currently preparing for OCJA (Prog 1) certification. I want to read your book as soon as i am done with my certification.
1 year ago
I like both and (i think) both has its advantages . Book gives structure to the learning process . Videos help because it reinforces a concept visually.
1 year ago
Yes ...Thanks to both of you.
10 years ago
Thank you for the explanation, Campbell.
10 years ago
Thank you Christophe . The link was helpful.
10 years ago
In the lesson on java identifiers , i see that the below mentioned identifier is considered illegal , but not sure why ? I mean - it seemed to follow the rules .

int e#_couut;

Is it because '#' is not a unicode character ? Is there a chart some where that lists all the allowed values that can be used in an identifier name ?

10 years ago