设有如下类:
class MyPoint {
void myMethod() {
int x, y;
x = 5; y = 3;
System.out.print( " ( " + x + ", " + y + " ) " );
switchCoords( x, y );
System.out.print( " ( " + x + ", " + y + " ) " );
}
void switchCoords( int x, int y ) {
int temp;
temp = x;
x = y;
y = temp;
System.out.print( " ( " + x + ", " + y + " ) " );
}
}
如果执行myMethod()方法,则输出结果为?
A. (5, 3、(5, 3、(5, 3、
B. (5, 3、(3, 5、(3, 5、
C. (5, 3、(3, 5、(5, 3、
答案说明:本题目答案来自网络整理或转载,最终答案请以官网为准。
答 案:C