[5160] in java-interest
Re: Strings.substring() and the == operator
daemon@ATHENA.MIT.EDU (Tim_Bolger@ifsinc.com)
Tue Jan 30 14:31:20 1996
From: Tim_Bolger@ifsinc.com
Date: Tue, 30 Jan 96 09:12:00 CST
To: java-interest@java.sun.com
Although not _yet_ a Java programmer, I have a comment on the operator
==.
In a datacentric model, "12345" == "12345"
: but objects also include _behavior_.
If a class ZipCode is derived from class String, then ZipCode("12345") !=
String("12345"), since they probably have a different meaning and intent.
In other words, content != context.
Thanks,
Tim
Tim_Bolger@ifsinc.com
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com