Page 2 of 2 FirstFirst 12
Results 21 to 28 of 28

Thread: Which constructor will be called in main

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Expert Member
    Join Date
    Dec 2007
    Answers
    138

    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


  2. #2
    Junior Member
    Join Date
    Apr 2009
    Answers
    2

    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.


  3. #3
    Junior Member
    Join Date
    Jul 2008
    Answers
    4

    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



  4. #4
    Junior Member
    Join Date
    Aug 2008
    Answers
    2

    Re: Which constructor will be called in main

    2nd contructor will be called


  5. #5

    Re: Which constructor will be called in main

    Compile time error will be caused.


  6. #6
    Junior Member
    Join Date
    Dec 2008
    Answers
    2

    Arrow Re: Which constructor will be called in main

    No Constructor will be called.
    Their must be an error..........


  7. #7
    Junior Member
    Join Date
    Mar 2009
    Answers
    1

    Re: Which constructor will be called in main

    no constructor is invoked


  8. #8

    Re: Which constructor will be called in main

    what is the use of final class when we cannot not extend or import


Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact