javagyan.com
Evolution of Java - Architect's Diary
http://www.javagyan.com/useful-tips/evolutionofjava
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Posted 23 Oct 2011, 23:18. By Sanjeev Kumar [ updated 29 Nov 2011, 23:20. I thought it would be useful for architects, designers and developers to understand how Java has evolved since its inception so that they are aware of what all capabilities they have access to when working with a particular version of Java. Besides, it is always good to have knowledge about evolution of the technologies that you are working with. Choosing the right Collection.
javagyan.com
Awesome place to access Java source code online - Architect's Diary
http://www.javagyan.com/useful-tips/awesomeplacetoaccessjavasourcecodeonline
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Awesome place to access Java source code online. Posted 3 Aug 2011, 23:18. By Sanjeev Kumar [ updated 10 Nov 2012, 11:23. Http:/ www.mavenjava.com/. NOTE: A JavaGyan reader " Kallol Das. Pointed out that the link above seems to be dead from quite some time. www.kickjava.com is another alternative but that too has availability issues at times. This website is developed and maintained by Sanjeev Kumar. You can follow him on these social networks.
javagyan.com
Exception Handling Guidelines/Best Practices - Architect's Diary
http://www.javagyan.com/useful-tips/exceptionhandlingguidelinesbestpractices
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Exception Handling Guidelines/Best Practices. Posted 5 Apr 2012, 03:25. By Sanjeev Kumar [ updated 17 Apr 2012, 02:34. Let’s review some basic exception design guidelines, summarized from Object Design: Roles, Responsibilities, and Collaborations (Rebecca Wirfs-Brock and Alan McKean, Addison-Wesley, 2003). Don’t try to handle coding errors. Avoid declaring lots of exception classes. Provide context along with an exception. Uninformative stack traces a...
javagyan.com
Choosing the right Collection - Architect's Diary
http://www.javagyan.com/useful-tips/choosingtherightcollection
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Choosing the right Collection. Posted 23 Aug 2011, 03:41. By Sanjeev Kumar [ updated 4 Apr 2012, 11:01. Here is a quick guide for selecting the proper implementation of a. Here, "ordering" refers to the order of items returned by an Iterator. And "sorting" refers to sorting items according to Comparable. Principal features of non-primary implementations :. HashMap has slightly better performance than LinkedHashMap. LinkedHashSet - insertion order.
javagyan.com
Java 7 Updates - Architect's Diary
http://www.javagyan.com/useful-tips/Java7Updates
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Posted 23 Nov 2011, 06:51. By Sanjeev Kumar [ updated 24 Nov 2011, 03:31. It has been quite sometime that Java 7 got released with plenty of new features and enhancements that shall interest Java developer community. Following sections of this page cover some of these changes with examples. Strings in switch statements. The diamond operator " ". Handling more than one type of exception. Re-throwing exceptions with more inclusive type checking. Java SE...
javagyan.com
Overloading can be tricky - Architect's Diary
http://www.javagyan.com/useful-tips/overloadingcanbetricky
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Overloading can be tricky. Posted 31 Dec 2010, 05:18. Extra care must be taken while writing Overloading methods. The compiler decides which version of an overloaded method will be called based on declared compile-time type, not run-time type. For the case in which overloaded methods have the same number of arguments, the rules regarding this decision can sometimes be a bit tricky. If there may be confusion, you may simplify the design:. The views exp...
javagyan.com
Beware of floating point numbers - Architect's Diary
http://www.javagyan.com/useful-tips/bewareoffloatingpointnumbers
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Beware of floating point numbers. Posted 29 Dec 2010, 10:23. By Sanjeev Kumar [ updated 11 Nov 2011, 06:05. Outside of a scientific or engineering context, the use of float and double (and the corresponding wrapper classes Float and Double ) should likely be avoided. The fundamental problem is that rounding errors will always occur when using these data types - they are unavoidable. From an IBM article on this topic :. From an article by Brian Goetz :.
javagyan.com
Creating Thread-Safe Singleton? - Architect's Diary
http://www.javagyan.com/useful-tips/howtocreatethread-safesingleton
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Posted 6 Feb 2012, 02:59. By Sanjeev Kumar [ updated 16 Nov 2012, 10:45. A singleton class should be designed to ensures that there exists only one instance per application. Special care must be taken if your application is deployed on a clustered environment as in this case it is possible that multiple instance of your singleton class are available in your application. Here are a few ways to create a thread safe singleton classes in your application.
javagyan.com
Implementing Comparable and understanding compareTo - Architect's Diary
http://www.javagyan.com/useful-tips/implementingcomparableandunderstandingcompareto
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Implementing Comparable and understanding compareTo. Posted 17 Apr 2012, 00:04. By Sanjeev Kumar [ updated 17 Apr 2012, 00:06. Using objects as keys in a. Using objects as elements in a. Method is the sole member of Comparable interface. It provides a means of fully ordering objects. For a concrete comparable implementation class to work well, the. Implementation needs to satisfy the certain conditions. Is the opposite sign of. And same for less than).
javagyan.com
Eclipse Keyboard Shortcuts - Architect's Diary
http://www.javagyan.com/useful-tips/EclipseKeyboardShortcuts
Java Tips, Hacks, Updates. Java Tips, Hacks, Updates. Posted 29 Dec 2010, 04:42. By Sanjeev Kumar [ updated 11 Nov 2011, 06:15. These keybindings are made by Carsten Ullrich (cullrich located-at activemath.org) and are released under the Creative Commons Attribution-ShareAlike 2.5 License (http:/ creativecommons.org/licenses/by-sa/2.5/). This website is developed and maintained by Sanjeev Kumar. You can follow him on these social networks. Misconceptions About Software Architecture.
SOCIAL ENGAGEMENT