Created
May 7, 2017 07:17
-
-
Save BalicantaYao/bb70722db6fd7042658d224582e0e9d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void runCase1() { | |
int j = 10; | |
Point point = new Point(4, 4); | |
logger.info(“Before Modify Point {}, j ={}”, point, j); | |
setPointLocation(point, j); | |
logger.info(“After Modify Point {}, j ={}”, point, j); | |
// Result | |
// Before Modify Point Point{y=4, x=4}, j =10 | |
// During Modify Point Point{y=5, x=5}, j =20 | |
// After Modify Point Point{y=5, x=5}, j =10 | |
} | |
private static void setPointLocation(Point pointInst, int j) { | |
pointInst.setLocation(5, 5); | |
j = 20; | |
logger.info(“During Modify Point {}, j ={}”, pointInst, j); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment