Implementing Assertions for Java
By Jeffery E. Payne, Michael A. Schatz, and Matthew N. Schmid
Dr. Dobb's Journal January 1998
. . .
Coordinate x, old_x ;
x = new Location() ;
x.setValue(5);
old_x = x ;
x.setValue(10) ;
. . .
Example 1: In C++, old_x has the value 10; in Java, 5. (Coordinate is a user-defined type.)
Back to Article
Copyright © 1998, Dr. Dobb's Journal