?
Solved

is this constructor public, why or why not

Posted on 2006-06-22
3
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Assisted Solution

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

Accepted Solution

by:
hoomanv earned 300 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

765 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