reji singh

Ranch Hand
+ Follow
since Apr 06, 2009
Merit badge: grant badges
For More
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 reji singh

Hi Swati,
I heard about this today and i also have same but dont know details... did you get anything on this..?

congratulations Arsen....
14 years ago
congratulations
14 years ago

Soniaa Agarwal wrote:
Thanks Henry for the prompt reply but I am still not getting it. How come
methods set(T) and set(Object). are overloaded methods.


Why does the following work :



class superc<T>{

void set(T arg){}

}


class subc extends superc<Number>{

void set(Number aa){}

}



Hi Sonia,
Can you pleaseadd why did void set(Number aa){} work?
congrats Sunil
14 years ago
Thanks Bob, I didnt know the var-args priority. However, with your explanantion another doubt arises in my mind ( may be a basic one )

widening + boxing not allowed !!! why is this for short type of primitive. Usually short, char, byte all get widen to int , so method below should have called

int doX(Integer x, Integer y) { return 3; }
Just to add why the output comes to be 4,3 rather than 2,3?

Thanks
Hi All,

As per JDK docs

If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false, //1

even though 0.0f==-0.0f has the value true. //2

Doubt: I agree with statement 1 as -0.0f is not equal to 0.0f but why statement 2 is true? It should not be true as per equality of Objects and primitives.


Thanks
congratulations Anu.
14 years ago
HI Markus Stäuble/Sven Lüppken

A very welcome to the forum a great JAVA platform for all.

Regards,
14 years ago
Congrats Ruben and Morteza. You guys have been great at explaining the questions with detailed analysis.

Keep pouring in your thoughts in this forum. you guys have been great contributor here.
14 years ago
good question. nice answer Ruben.

Thanks