Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

On virtual machines and expected behaviour

Name: Anonymous 2010-05-17 19:44

Ever tried running this on your ENTERPRISE VIRTUAL MACHINE?
Integer a = 1000;
 Integer b = 1000;
 System.out.println("a == b (1000 == 1000): " + (a == b));

 Integer aa = 100;
 Integer bb = 100;
 System.out.println("aa == bb (100 == 100): " + (aa == bb));

Guess what's the output, run it and report back.

Name: Anonymous 2010-05-17 23:49

Name: Anonymous 2010-05-17 23:58

>>41
If you're going to accept that, you should also accept that the Integer behavior is defined and specified.

>>40
You're full of shit, of course, but if you did have a VM like that, it wouldn't conform to the spec. The discussion was over several posts ago, but you're too immature to admit it.

Name: Anonymous 2010-05-18 0:06

>>42
At the very least someone is actually having fun in a /prog/ Java thread for once ...

Name: Anonymous 2010-05-18 0:34

>>42
Well, you almost had me for a minute there but I was looking at the older version of the spec. Compare:
http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html#101083
http://java.sun.com/docs/books/jls/third_edition/html/lexical.html#3.10.5

And note the careful rewording of:
"Strings computed at run time are newly created and therefore distinct. "
into:
"Strings computed by concatenation at run time are newly created and therefore distinct. "

Name: Anonymous 2010-05-18 0:50

>>44
At first that String comparison demonstration made me question my sanity but the very next second I realized what was going on.

What's the moral of this thread?  In Java, the differences between Object variable = value; and Object variable = new Object(value); can not be taken for granted?

Name: Anonymous 2010-05-18 0:56

>>45
The moral of this thread is ``don't use anus ''.

Name: Anonymous 2010-05-18 1:02

>>45
The moral is that Java sucks ass and its designers are brain-damaged.

Name: Anonymous 2010-05-18 1:17

>>47
The moral is that Java sucks ass and its designers and users are brain-damaged.
FTFY

Name: Anonymous 2010-05-18 1:31

>>48
The moral is that Java sucks ass and its designers and users are ENTERPRISE
ftfy

Name: Anonymous 2010-05-18 3:04

>>47
even guy steele?

Name: Anonymous 2010-05-18 5:13

>>50
I don't think he actually did design work, just helped write the spec

Name: Anonymous 2010-05-18 9:21

>>48-49
Fixed that for you?
Fuck that, fuck you?

Name: Anonymous 2011-02-04 12:06

Name: Anonymous 2013-01-19 23:39

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List