Why not to use finalize() method in java
We all know the basic statement that finalize() method is called by garbage collector thread before reclaiming the memory allocated to the object. In this post, we will drill down more deeply into...
View ArticleUnderstanding the compiler error message when hiding final static methods
Well, all of us know about method overriding and method hiding. Have you tried extending static methods, specially when they are final in parent class. Lets see my observations. Below is the program,...
View ArticleDouble Brace Initialization in java
Don’t you feel that Java should have a more convenient syntax for collections (lists, maps, sets, etc.). The reason I am saying this is because every time if you have you use a collection in your code...
View ArticleJava is pass by value : lets see how?
There has been a good amount of debate on whether “java is pass by value or pass by reference?”. Well, lets conclude it last time, Java is pass by value and not pass by reference. If it had been pass...
View ArticleWhat is polymorphism in java
“Subtype polymorphism, often referred to as simply polymorphism in the context of object-oriented programming, is the ability to create a variable, a function, or an object that has more than one...
View ArticleInstances of same class can access private members of each other
From this post onwards, I will spend few days in sharing some little known (if not unknown) features of java language, which we either don’t knew before or didn’t care to think differently. I will...
View ArticleChecked exceptions thrown in initializer blocks can be declared by the...
This post is in continuation to exploring little known features of java. In previous post, I have covered “Instances of same class can access private members of each other” and Some very surprising...
View ArticleMethod Overloading and Overriding Rules in Java
Method overloading and overriding ( in other words, polymorphism in java) is neither a very difficult concept and nor it’s one of very unknown topics. Yet, I am bringing this... The post Method...
View ArticleObject-Oriented Principles in Java
The object-oriented paradigm supports four major principles: abstraction, encapsulation, inheritance, and polymorphism. They are also known as four pillars of the object-oriented paradigm. Abstraction...
View ArticleMultiple Inheritance in Java with Example
As we have long learned the fact that multiple inheritance is not supported in java, well that was only till java 7. In Java 8, we can realize the concept of multiple inheritance through use of default...
View Article
More Pages to Explore .....