Berkeley CSUA MOTD:Entry 17907
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2000/4/1-3 [Computer/SW/Languages/Java, Computer/SW/Languages/Perl] UID:17907 Activity:high
3/31    how can i tell whether a Java object is an array?
        ie applet.getClass().toString() -> java.applet.Applet
        (new int[] { 1, 2, 3 }).getClass() -> ?
        \_ Arrays aren't objects, they are primitive types.  Your question
           betrays a serious lack of understanding of what an object is, and
           an array is.  I hope you haven't graduated.
           \_ Your reply betrays a serious lack of experience programming
              in Java,  Java isn't my first choice, but that's like one
              of the first principles you learn coding in it.
           \_ "Java arrays are objects" -- the opening words of Chapter 10,
              Arrays, in the Java Language Spec.
           \_ nevertheless, you can do:
                1) (new int[] { 1, 2, 3 }).getClass()
                2) Object o = (new int[] { 1, 2, 3 })
                3) BUT NOT Object o = 1
              so its not an object... ??? :p
              go read: http://www7.software.ibm.com/vad.nsf/Data/Document2712
              and you'll see the reason for the question.
              its a big kludge by Sun
           \_ array.getClass().isArray() -> true
              hope you haven't graduated either ;p
                \_ the String class supports '+' and '+='
                   \_ that's just syntatic sugar,
                      but object vs primitive in Java is a Real Big Mess(TM)
                        \_ "Java=C++--" - Bill Joy
                        \_ GO Smalltalk!!! -purist
                        \_ PERL 5.6!!!
                           \_ ED! ED is the Standard Language!
                                \_ so how can you tell if an ED! object is
                                   an array?
                                   \_ Its all just memory anyway, just toggle
                                      the right bits in RAM. How hard is that?
                                      (Not hard at all, if you have ED fu!)
                                        \_ It's easy in PERL.
                                           \_ This thread looks similar to
                                              Bresenham's algorithm.
                                                \_ I wrote that in PERL with
                                                   ED once, just for kicks.
                                                   \_ NO, WINDOWS. WINDOWS IS
                                                      THE STANDARD EVERYTHING.
                                                      \_ Microsoft invented
                                                         the Internet.
                                                         \_ I heard that BG
                                                            wrote PERL with an
                                                            early version of
                                                            ED.
                                                            \_ cool.
                                                   \_ NO, MAC OS X WILL SQUASH
                                                      WINDOZE SOON.  LONG
                                                      LIVE APPLE-NeXT
                                                      \_ NO, WINDOWS. WINDOWS
                                                         EATS EVERYTHING FOR
                                                         BREAKFAST. IT IS THE
                                                         SOLUTION TO ALL YOUR
                                                         PROBLEMS. NEED AN
                                                         ABORTION? WINDOWS
                                                         WILL TAKE CARE OF IT.
                                                         NEED TO HAVE YOUR CAR
                                                         FIXED. WINDOWS WILL
                                                         TAKE CARE OF IT. BILL
                                                         GATES IS MY GOD.
                                                      \_ NEGATIVE...THE
                                                         NEW HYBRID OF UNIX
                                                         AND THE MAC OS WILL
                                                         TURN THE TIDE IN
                                                         IN THE MAC/PC WARS
                                                         FOR YEARS TO COME.
                                                         MACS WILL NO LONGER
                                                         JUST LOOK GOOD...
                                                         THEY WILL ESTABLISH
                                                         A NEW PARADIGM IN
                                                         PERSONAL COMPUTING.
                                                         STEVE JOBS, THE
                                                         SMELLY-ASSHOLE,
                                                         DAUGHTER-DUMPING,
                                                         "REALITY DISTORTION
                                                         FIELD MAN" IS THE
                                                         TRUE MESSIAH WHO
                                                         WILL RESTORE
                                                         BALANCE TO THE
                                                         FORCE.  REMEMBER:
                                                         THERE CAN ONLY
                                                         BE ONE.
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2013/4/29-5/18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Compilers] UID:54665 Activity:nil
4/29    Why were C and Java designed to require "break;" statements for a
        "case" section to terminate rather than falling-through to the next
        section?  99% of the time poeple want a "case" section to terminate.
        In fact some compilers issue warning if there is no "break;" statement
        in a "case" section.  Why not just design the languages to have
        termination as the default behavior, and provide a "fallthru;"
	...
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
	...
2013/3/5-26 [Computer/SW/Languages/Java] UID:54618 Activity:nil
3/5     Three emergency Java updates in a month. Why do I have a feeling
        that the third one won't be the last one?
        \_ Bingo!
	...
2012/12/18-2013/1/24 [Computer/SW/Languages/Perl] UID:54561 Activity:nil
12/18   Happy 25th birthday Perl, and FUCK YOU Larry Wall for fucking up
        the computer science formalism that sets back compilers development
        back for at least a decade:
        http://techcrunch.com/2012/12/18/print-happy-25th-birthday-perl
        \_ I tried to learn Perl but was scared away by it.  Maybe scripting
           lanauages have to be like that in order to work well?
	...
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.
	...
Cache (137 bytes)
www7.software.ibm.com/vad.nsf/Data/Document2712
Be sure to include the URL of the page you were going to, and the page you were coming from, along with the time you received this error.