Friday, 30 July 2010

Forwarded to me from a friend

class fun {

public static void main(String[] args)
{

Integer a=10; Integer b=10; Integer c=1000; Integer d=1000;

System.out.println(a==b);//true
System.out.println(c==d);//false }

};

http://www.owasp.org/index.php/Java_gotchas#Immutable_Objects_.2F_Wrapper_Class_Caching

http://tech.puredanger.com/2007/02/01/valueof/

No comments:

Post a Comment