4 Replies - 7257 Views - Last Post: 29 June 2010 - 08:57 PM Rate Topic: -----

#1 rajeshram25@yahoo.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 26-October 08

access specifier of default constructor

Posted 26 October 2008 - 11:32 PM

Is their any way to know the access specifier of default constructor

This post has been edited by jayman9: 27 October 2008 - 07:23 AM

Is This A Good Question/Topic? 0
  • +

Replies To: access specifier of default constructor

#2 g00se  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2700
  • View blog
  • Posts: 11,369
  • Joined: 20-September 08

Re: access specifier of default constructor

Posted 27 October 2008 - 02:00 AM

The default ctor has, errr..., default access ;-)

http://mindprod.com/...faultscope.html
Was This Post Helpful? 0
  • +
  • -

#3 punit verma  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 20-May 09

Re: access specifier of default constructor

Posted 20 May 2009 - 04:11 AM

the default constructor has the same access specifier as the class access specifier

the default constructor has the same access specifier as that of the class

This post has been edited by punit verma: 20 May 2009 - 04:12 AM

Was This Post Helpful? 0
  • +
  • -

#4 Guest_mohan reddy*


Reputation:

Re: access specifier of default constructor

Posted 29 June 2010 - 08:35 PM

View Postg00se, on 27 October 2008 - 01:00 AM, said:

The default ctor has, errr..., default access ;-)

http://mindprod.com/...faultscope.html



the default access specifier for constructor is whatever the class contain the constructor contain same access specifier but this rule is applicable only for public and default classes .

because there is no convention to develop outerclasses as private and protected.

if we want to write your constructor as private or protected you can happily allow to write that constructor.



................MOHAN REDDY.K
Was This Post Helpful? 0

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8329
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: access specifier of default constructor

Posted 29 June 2010 - 08:57 PM

View Postrajeshram25@yahoo.com, on 27 October 2008 - 12:32 AM, said:

Is their any way to know the access specifier of default constructor

MyClass x = new MyClass();
default constructor will always be the one without parameter.
???

This post has been edited by pbl: 29 June 2010 - 08:58 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1