[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 201
  • Last Modified:

is this constructor public, why or why not

Hi,

If I write a class like this:

Class A
{
   A()
{}
}

Is A's constructor public?
0
ly_uwo
Asked:
ly_uwo
2 Solutions
 
CEHJCommented:
No. It has default access
0
 
hoomanvCommented:
if you left an access level unspecified for a variable or method, it cant be accessed from classes and subclasses declared outside its package, but its accessible within the package, as CEHJ refered to as default access
0
 
ly_uwoAuthor Commented:
thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now