Miga is correct

To support it see below of time comparisons.

       long t1=System.nanoTime();
       Integer x=5;
       long t2=System.nanoTime();
       long diff1=t2-t1;
       System.out.println(diff1);  // returns 516546


       long t3=System.nanoTime();
       Integer y=new Integer(5);
       long t4=System.nanoTime();
       long diff2=t4-t3;
       System.out.println(diff2); // returns 4749

hence as Miga said, it is just one operation and hence takes less time.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to