Solved

is this constructor public, why or why not

Posted on 2006-06-22
3
182 Views
Last Modified: 2010-03-31
Hi,

If I write a class like this:

Class A
{
   A()
{}
}

Is A's constructor public?
0
Comment
Question by:ly_uwo
3 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 50 total points
ID: 16960635
No. It has default access
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 75 total points
ID: 16960803
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
 

Author Comment

by:ly_uwo
ID: 16961043
thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
where is session ID cache stored 1 40
mapAB Challlenge 35 89
ArrayIndexOutOfBoundException 9 39
Image decoding from Camera 3 48
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This video teaches viewers about errors in exception handling.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now