Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Code efficiency test #1 (find the flaw).


    Botre
     Share

    Recommended Posts

    Nein.

    i dont understand tho...

     

    object : new Integer(1337) would return the same values, no?

    so whether is null or not its still returning 1337

    Link to comment
    Share on other sites

    i dont understand tho...

     

    object : new Integer(1337) would return the same values, no?

    so whether is null or not its still returning 1337

     

    Unless you set "object" to any of the 4 billion other int values it can hold, or to any other object.

    Link to comment
    Share on other sites

    Unless you set "object" to any of the 4 billion other int values it can hold, or to any other object.

     

    but you didn't :P

    I'm out of ideas now, I'm going to work

    Link to comment
    Share on other sites

    "object" can never be null (unless set within a different instance method) so the ternary in the getter is pointless (in this case).

     

    How is this inefficient?

     

    *gives medal*

     

    redundant (double) check = redundant processing = inefficient.

    Link to comment
    Share on other sites

    *gives medal*

     

    redundant (double) check = redundant processing = inefficient.

    But it's not, considering anyone working with your code could add an instance method #fuckWithBotre and set "object" to null.

    Link to comment
    Share on other sites

     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.