Berkeley CSUA MOTD:Entry 44170
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/04/03 [General] UID:1000 Activity:popular
4/3     

2006/8/28-31 [Computer/SW/Languages/Java] UID:44170 Activity:nil
8/27    Is there any object ID built into java?  In Ruby and Python
        there's a method on every object, getObjectID() that returns a
        unique ID for any object.  Is there anything like that iN java?
        \_ Object.hashCode() in general will return a unique value, although
           that is not contractually guaranteed.  You could get two different
           objects wiht the same hashcode, but Object.equals() should return
           false in this case.  There is no perfect ironclad method that I
           know of.  If you tell me what you're trying to do maybe I can
           suggest an alternative.
           \_ What I'm doing is a bit complex to explain on the motd, but
              basically, I need a simple (int, long, float, or string)
              unique identifier for each object.  I ended up writing a
              static class with an incrementing long.
              \_ You *did* make it thread-safe, I hope.
                 \_ No threads, although I guess it might be a good idea
                    anyway.  Although it's certainly not the only thing in
                    this code that's hideously un-thread-safe.
2025/04/03 [General] UID:1000 Activity:popular
4/3     

You may also be interested in these entries...
2013/5/1-18 [Computer/SW/Languages/Java, Computer/Theory] UID:54669 Activity:nil
5/1     What's the difference between CS and Computer Engineering?
        http://holykaw.alltop.com/top-ten-paying-degrees-for-college-graduates
        \_ One is science and the other is engineering.
        \_ From http://en.wikiquote.org/wiki/Computer_science
           'A folkloric quotation ... states that "computer science is no more
           about computers than astronomy is about telescopes."  The design
	...
2012/12/4-18 [Computer/SW/Languages/Java] UID:54544 Activity:nil
12/4    Holy cow, everyone around me in Silicon Valley is way beyond
        middle class according to Chinni's definition:
        http://en.wikipedia.org/wiki/American_middle_class
        \_ Let's set our goals higher:
           http://en.wikipedia.org/wiki/Upper_middle_class_in_the_United_States
           \_ How about this one?
	...
2012/10/29-12/4 [Science/Disaster, Computer/SW/Languages/Java, Politics/Domestic/President/Bush] UID:54516 Activity:nil
10/29   Go Away Sandy.
        \_ Sorry, Coursera is performing preventive maintenance for this
           class site ahead of Hurricane Sandy. Please check back in 15 minutes.
           class site ahead of Hurricane Sandy. Please check back in 15
           minutes.
        \_ Bitch.
	...
2012/1/18-3/3 [Computer/SW/Languages/Java, Finance/Investment] UID:54290 Activity:nil
1/18    I own a bunch of NFLX stocks bought at several different periods
        (from high $200 all the way down to $80). I dumped a few and
        still have a few. Why the hell is Reid Hastings still making
        $500,000/year? How do I join the pending NFLX Class Action
        Lawsuit?
        \_ Why would you buy stock in a company run by a narcissistic
	...