answersLogoWhite

0

no we cannot initialize a constructor in private in order to call a constructor from outside of a class it must be a public member.in order to create an object we should call the constructor .so only private members can implement outside of the class.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do we invoke a constructor?

In Java, objects are constructed. Every time you make a new object, at least one constructor is invoked. Every class has a constructor, although if you don't create one explicitly, the compiler will build one for you. Ex: class Test { public Test() { } // this is Test's constructor public void Test() { } // this is a badly named, // but legal, method } If you see the example above, you would have realized that the constructor looks a lot like methods. Below are the main distinguishing factors between the constructor and normal methods: 1. The Constructor's name is exactly the same as the name of the class 2. They do not have a return type (Please remember this. A Constructor cannot have a return type as part of the code) 3. Constructors cannot be static, abstract or final


what are women's private part?

there private part is a secret


What is a pussy and a cock?

A puss’y is a girl’s private part and a cock is a man private part


Is a Belly Button a Private Part?

A private part is any part that would normally be covered by clothing. So Yes is your answer.


What are the similarities between constructor overloading and function overloading?

The only similarity is that both constructor and function overloads are distinguished by their signature -- the number and type of their arguments. Functions differ in that they also have a return type, which is also part of the signature, whereas constructors have no return type, not even void.


My friend that is a girl told me there is a weakspot on girls but wont tell me were it is were is it?

The weak part of a girl is her private partThe weak part of a girl is her private part


What arethe advantages and disadvantages of aflowchart IN c language?

Nope, as flowcharts aren't part of C-language. Nonetheless, you can implement algorithms specified by flowcharts in C, but that might lead to unstructured code (also known as 'spaghetti-code'), which is outdated by forty years... Try using stuctograms instead.


What is the most ticklish part of a boy or a man?

His private part


Can you fish on streams on private property?

Definitely not. The stream is part of the private property.


What is Diznick?

private part of girls


Does Sonic the Hedgehog have a private part?

no


What is cbye?

Private part of men