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

Thread: Which constructor will be called in main

  1. #21
    Junior Member
    Join Date
    Jul 2008
    Answers
    4

    Re: Which constructor will be called in main

    Quote Originally Posted by sutnarcha View Post
    I guess,

    It looks for a default constructor in the class 'A'.

    As it is not their, it doesn't call any of the 2 constructors because they need a not null argument for its parameter.


    sorry dear.. But ur wrong
    It will not call any constructor it ll just give an compile time error...
    it will say a message like constructor A is ambiguos



  2. #22
    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



  3. #23
    Junior Member
    Join Date
    Aug 2008
    Answers
    2

    Re: Which constructor will be called in main

    2nd contructor will be called


  4. #24

    Re: Which constructor will be called in main

    Compile time error will be caused.


  5. #25
    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..........


  6. #26
    Junior Member
    Join Date
    Mar 2009
    Answers
    1

    Re: Which constructor will be called in main

    no constructor is invoked


  7. #27

    Re: Which constructor will be called in main

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


  8. #28
    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.


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