This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!

Sourabhkapoor Kapoor

Greenhorn
+ Follow
since Oct 09, 2009
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sourabhkapoor Kapoor

Thanks Salil for the reply.
I still have one question if gb1 is actually representing GARB_3 and therefore gb1.g will be GARB_B2 as explained by you.
Why gb2.g is still referring to GARB_8.Wont it be GARB_7 for same reason?
I am having difficulty understanding this..

Regards,
Sourabh Kapoor.
Hi Edmen,
Thanks for the detailed explanation.
Can anyone please tell me why on last line it will be "GB_8->GB_2" instead of "GB_8->GB_3"
Answer will be same in both cases but just wondering if i left something out(gb1.g is GB_3)

Thanks
public class xt{

public static void main(String argv[]){
int i=2;
doNumber(i);
}

public static void doNumber(int... dn){ //line 4
System.out.print("c");
}


public static void doNumber(Integer... dn){ //line 5
System.out.print("b");
}

public static void doNumber(Object dn){ line 6
System.out.print("e");
}

}


Answer: e
Modified rule 4 needs to change i think..Please correct me If i am wrong

line 4:rule 4(a)
line 5 :rule boxing var-args 4(c)
Still can compile no ambiguity cuz line 6 will help the compiler to resolve ambiguity.