calling a method from a method

how would you code to call a method from another method? Thanks.

Comments

  • : how would you code to call a method from another method? Thanks.
    :


    if you have two methods.
    One called printName();
    and one called printAddress()

    while you are in printName(){

    printAddress();


    }

    Aint nothing to it but to do it!
    Linux: Because rebooting is for adding new hardware!

  • : how would you code to call a method from another method? Thanks.

    1) If both methods are in the same class:
    [blue]doCallMethod ();[/blue]
    2) If the second method is static and in another class:
    [blue]AnOtherClass.doCallMethod ();[/blue]
    3) If the second method is instant (?):
    [blue]createdObject.doCallMethod ();[/blue]



    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • By the way, it sounds like you're not just asking pushed purely by curiosity but rather because you have tried to do something and it didn't work the way you expaected it to (we call that "programming" :-)).

    If so, what did you tried to do and what did you actually do?



    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

  • Actually, it is by curiosity. I have read conflicting ways to call methods from methods, or maybe I'm just getting the programming languages confused. Your reply is excellent. And thank you for the concern.
  • : Actually, it is by curiosity.

    Really? That's a new one. Well, the curious will rule the Earth eventually so...

    : I have read conflicting ways to call methods from methods, or maybe I'm just getting the programming languages confused. Your reply is excellent. And thank you for the concern.

    Thank you.



    Kind Regards
    Konrad
    ----------------------------
    (+46/0) 708-70 73 92
    chamster@home.se
    http://konrads.webbsida.com

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories