Can we have private constructor in our class file. When we
are trying to create instance for the class will it create
or throw error regarding that?
Answer Posted / saiish bhat
ya,we have private constructor.but it wont throw an exception.
but u cant create an instance of p.c.
it is not possible to inherit from that class also.
ex:
private class a()
{
}
class b : a
{ }
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Is there an equivalent to the instanceof operator in visual j++?
What is the difference between dynamic and var in c#?
What issues can be faced while delivering code?
Can we make a Static Constructor Parameterized? Give Reason with your answer
How to find whether the application is run from inside ide or not?
Can we overload the main method in c#?
What is dynamic in c#?
What happens when thread sleep () method is called?
What's the difference between the debug class and trace class? Documentation looks the same.
How do I trim a space in c#?
What is disco?
what is full assembly reference
How do you serialize in c#?
Explain the access modifiers in c#?
What is string [] args in c#?