tag:blogger.com,1999:blog-8712770457197348465.post8165919091895638809..comments2024-03-29T00:43:22.798-07:00Comments on Javarevisited: 10 Difference between Primitive and Reference variable in Java - Example Tutorialjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8712770457197348465.post-57544594698000239152018-11-06T07:08:44.434-08:002018-11-06T07:08:44.434-08:00What is the term handle refer to....is it the obje...What is the term handle refer to....is it the object reference variable ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-10532878024474482862018-02-22T05:13:46.454-08:002018-02-22T05:13:46.454-08:00Thanks, i really helpedThanks, i really helpedAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-34840690745205143952017-03-12T08:42:57.056-07:002017-03-12T08:42:57.056-07:00Thank you for this article, it is very thorough.
O...Thank you for this article, it is very thorough.<br />One comment though, in Program to demonstrate difference between primitive and reference type, I suppose you meant to write:<br />print(i) and not print(30)<br />Anonymoushttps://www.blogger.com/profile/02662810702855154785noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-2686213173402458772017-03-06T16:08:03.371-08:002017-03-06T16:08:03.371-08:00Thanks @Joseph, that's true, but not just inst...Thanks @Joseph, that's true, but not just instance variable but static variable also get initialized with default value. In short, member variable get initialized with default value e.g. 0 for int, 0.0 for float and double, false for boolean, and null for reference type. <br /><br />Local variables doesn't automatically initialized by default value, you must initialize them before using javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-12652821431731470462017-03-06T08:48:42.737-08:002017-03-06T08:48:42.737-08:00Actually, only Instance Variables get a default va...Actually, only Instance Variables get a default value. Local variables do not get a default value, you must initialize them manually. If you don't initialise a loval variable before using it the compile will return an error.Joseph Chotardhttp://www.gamepickle.netnoreply@blogger.com