Interview Questions වලට Support එකක් දෙමුද ?

Interview Questions වලට Support එකක් දෙ&#3512

  • support එකක් දෙනවා

    Votes: 133 85.3%
  • වෙලාවක් නැ

    Votes: 23 14.7%

  • Total voters
    156

NJack

Active member
  • Jun 4, 2017
    471
    144
    43
    C# method overloading,Overriding wala different return types use karanna puluwanda? dekedima baane, ethakota monawahari change karala use karanna puluwan neda?

    common interview question
     
    • Like
    Reactions: saja

    saja

    Well-known member
  • Jan 8, 2007
    16,203
    2
    10,802
    113
    Home Sweet Home
    overloading
    You can not overload the function by differ only their return type . You can only overload the function in following ways

    • Parameter types
    • Number of parameters
    • Order of the parameters declared in the method
    You can not come to know which function is actually called (if it was possible).

    public int Bar(int a)
    {
    return 10;
    }

    public string Bar(int a)
    {
    return "10";
    }

    error : already defines a member called 'Bar' with the same parameter types



    C# method overloading,Overriding wala different return types use karanna puluwanda? dekedima baane, ethakota monawahari change karala use karanna puluwan neda?

    common interview question
     

    EMINƎM

    Well-known member
  • Aug 15, 2011
    5,123
    727
    113
    Rochester Hills, Detroit, Michigan, U.S.
    overloading
    You can not overload the function by differ only their return type . You can only overload the function in following ways

    • Parameter types
    • Number of parameters
    • Order of the parameters declared in the method
    You can not come to know which function is actually called (if it was possible).

    public int Bar(int a)
    {
    return 10;
    }

    public string Bar(int a)
    {
    return "10";
    }

    error : already defines a member called 'Bar' with the same parameter types

    Java walath overloading krnna ba return type wenas krla. Ambiguity eka nisa.
    Eth Java 5 wala idala override krna method eke return type wenas krnna puluwan. Ekata kiyanne covariant return type kylaa
     
    • Like
    Reactions: saja

    saja

    Well-known member
  • Jan 8, 2007
    16,203
    2
    10,802
    113
    Home Sweet Home
    ok ,my examples are c#
    EMINƎM;24136484 said:
    Java walath overloading krnna ba return type wenas krla. Ambiguity eka nisa.
    Eth Java 5 wala idala override krna method eke return type wenas krnna puluwan. Ekata kiyanne covariant return type kylaa
     

    amilabanuka

    Well-known member
  • Sep 30, 2006
    7,298
    892
    113
    Thama math hoyanooo....
    Like I said, it's an interesting question to measure logical thinking. We use similar questions.
    A friend of mine got this in one of his interviews afaik. It's just not hard.

    this is not to evaluate how good you are with algo. it is to see how you envision maintainability, scalability into your solution. how open are you for refactoring etc. some tech companies ask a very simple question and build a big interview on that. I was asked to compare two string to see if they are anagrams. from this, I designed complete rest service with multi-data-center solution to few thousands of requests per second.
     

    Djice

    Well-known member
  • Jan 17, 2011
    4,422
    3,801
    113
    out of fucked up land
    this is not to evaluate how good you are with algo. it is to see how you envision maintainability, scalability into your solution. how open are you for refactoring etc. some tech companies ask a very simple question and build a big interview on that. I was asked to compare two string to see if they are anagrams. from this, I designed complete rest service with multi-data-center solution to few thousands of requests per second.
    Cool. Didn't knew that.