a question for java masters

Discussion in 'Programming' started by veerbahadur, Jan 27, 2008.

  1. #1
    How to create a method with 2 different constructors?
    1 empty and 1 with an int value that will multiply the power of 3 recursively. The result will be the power of 3 with a limit of 100000.
     
    veerbahadur, Jan 27, 2008 IP
  2. daringtakers

    daringtakers Well-Known Member

    Messages:
    808
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Methods cant have constructors. constructors are for classes.

     
    daringtakers, Jan 28, 2008 IP
  3. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can create a method with different parameters.
     
    Arkserver, Jan 29, 2008 IP
  4. webmaster_TSU

    webmaster_TSU Peon

    Messages:
    449
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Do you just mean a class with two different constructors?
     
    webmaster_TSU, Jan 29, 2008 IP
  5. Arkserver

    Arkserver Banned

    Messages:
    2,533
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hmm.. no wonder this topic looked familiar.. i asked him that question to check if he really knows a bit about java..
    http://www.engineeringserver.com/pwned/dp/


    Good for me that i saw this topic or else i would have told him i would hire him for a few months. lol.

    Gotta show this topic to my co =D
     
    Arkserver, Jan 29, 2008 IP