So.. it is based on your requirement how you want to initialize the properties.
In some cases you might want to give privilege to others to supply the property values and you can go with the constructor with arguments.
Hope this makes sense.
Ramesh Kumar Muthukumar wrote:how do you create an instance for a class? - only through the 'new' keyword followed by the default constructor.
So when you do not have the default constructor the jvm provides one when creating the instance.
No, the compiler provides one when you compile the class.
edit: As mandated by the JLS: http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.8.9
Shiv Vishwakarma wrote:but it is still provided by the JVM
Actually, as someone already said, by the compiler. And in my view, letting the compiler do things for you is a bad habit to get into, because it can lead to you getting compiler errors for things you can't see (the compiler puts the constructor in your .class file, not your source code).
So my advice is to always write your constructors (and calls to superclass constructors) explicitly - even if they're the same as the ones that would be created for you automatically.
As to initializers: they're needed very rarely. I can't remember the exact time I last wrote one, but it was certainly more than a year ago; and I write classes most days.