• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

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