When you can omit constructor keyword from the primary constructor?

Question:When you can omit constructor keyword from the primary constructor?

1.It can be omitted only if an init block is defined

2.It can be omitted anytime; it is not mandatory.

3.It can be omitted if secondary constructors are defined.

4.It can be omitted when the primary constructor does not have any modifiers or annotations.


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!