Exceptions in Java provide a consistent mechanism for identifying and responding to error conditions. Effective exception handling will make your programs more robust and easier to debug. Exceptions are a tremendous debugging aid because they help answer these three questions: What went wrong? Where did it go wrong? Why did it go wrong? When exceptions … Continue reading Three Rules for Effective Exception Handling
Category: Java
10 Most Useful Java Best Practice Quotes for Java Developers
Quote 1: Avoid creating unnecessary objects and always prefer to do Lazy Initialization Object creation in Java is one of the most expensive operation in terms of memory utilization and performance impact. It is thus advisable to create or initialize an object only when it is required in the code. Quote 2: Never make an … Continue reading 10 Most Useful Java Best Practice Quotes for Java Developers
Encapsulation in java and its relation with abstraction
Most of you will agree that encapsulation and abstraction together brings a lot of confusion. Most blogs add only confusion further. Lets solve this puzzle. I started working on this post after my previous post “Understanding abstraction in Java“. My goal was to understand encapsulation in java and how it relates to abstraction. As soon … Continue reading Encapsulation in java and its relation with abstraction
Understanding abstraction in java
In computer science, abstraction is the process by which data and programs are defined with a representation similar in form to its meaning (semantics), while hiding away the implementation details. Source : WikiPedia abstraction – a concept or idea not associated with any specific instance. Sections: What is abstraction Types of abstraction How to use abstraction in … Continue reading Understanding abstraction in java