Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Access modifier for no-args constructor  RSS feed

 
Glenn Gould
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The default no-arg constructor is created by the compiler implicitly.

Can someone verify the following:

The access type of a default constructor is the same as the access type of the declared class.

So if the class in question is



the default no-args constructor which is implicitly created
will have access modifier "default" (also known as package access).

Please confirm.
Thanks in advance.
 
E Armitage
Rancher
Posts: 989
9
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!