-
Expert Member
Re: Which constructor will be called in main
Hi I have tried to compile this code,, but it gives me compilation error,,,,
The reason for that as my understanding is:
1. The order to invoke constructor is the most specific to generalize, hence "null" is not an identifier/keyowrd. and then non of constructor find that match ,, so throw an exception
-
Junior Member
Re: Which constructor will be called in main
it called default constructor but here not any constructor which accept null value, so it will give a compiler error.
-
Junior Member
Re: Which constructor will be called in main
It will not cll any of the constructor ...
It ll just give u an Compile time error sying like
constructor A is ambiguos
-
Junior Member
Re: Which constructor will be called in main
2nd contructor will be called
-
Junior Member
Re: Which constructor will be called in main
Compile time error will be caused.
-
Junior Member
Re: Which constructor will be called in main
No Constructor will be called.
Their must be an error..........
-
Junior Member
Re: Which constructor will be called in main
no constructor is invoked
-
Junior Member
Re: Which constructor will be called in main
what is the use of final class when we cannot not extend or import
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules