Originally posted by Nidhi:
Hi folks!!preparing for SCJP...i am unclear about the case when private methods are overridden in the subclass then which method is called that of the base class or the derived class....read somewhere that private methods are statically bound i.e. no matter the derived class defines the method with same signature as private method in base class the method will call the private method in the class where it is defined..... My answers don't tally with this rule.
Originally posted by Saniya Ansari:
ok there is this question in Mughal's book.. i'm kinda confused although it seems easy..
public static void main(String args[]){
int k= 1;
int i= ++K + k++ + + k
System. out. prinln(i);
}
The answer is 7.. i'm not sure how.. HELP!