San Daida

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

Recent posts by San Daida

Congrats.....
16 years ago
hi angelika ann,

Check the while condition first, two conditions are combined with "OR" . it prints 1433


You are right Morteza , Golden rules are not easy to understand and killing my mind.
What ever rules you mentioned are easy to capture and remember. Thanks for your reply
i=i++ means assign the value of i to i and increment. Increment of i will be done after assignment.
you are not capturing the value of i++. Due to this reason the value of i always 0 in 02,03,04 lines.
Hi All,

Could you please clarify my doubts related to below question



If I compile this program , I am getting below compilation errors.
VarArgsTest.java:9: reference to doArgs is ambiguous, both method doArgs(int...) in VarArgsTest and method doArgs(java.lang.Integer...) in VarArgsTest match
vat.doArgs(1,2);
^
VarArgsTest.java:11: reference to doArgs is ambiguous, both method doArgs(int...) in VarArgsTest and method doArgs(java.lang.Integer...) in VarArgsTest match
vat.doArgs(new Integer(1),new Integer(2));
^
2 errors

If I do coment the any one of doArgs(int...) , doArgs(java.lang.Integer...) method , it is compiling and running fine. My doubt is that why is compiler treating doArgs(Integer i) and doArgs(int i) are different. In that case doArgs(int...) , doArgs(java.lang.Integer...) should be treated as different. Can you please explain.