PPT Slide
class MyObject {
String name;
public MyObject (String n) {
name = n;
}
public String toString () {
return (name);
}
}
public class SwapTester {
public static void swapInt (int x, int y) {
int temp;
System.out.println ("Doing swapInt");
temp = x;
x = y;
y = temp;
}
Objects vs. References--An Example
Previous slide
Next slide
Back to first slide
View graphic version