示例
public
static
void
main(
String
[] args ) {
int
x =
0
;
int
y =
0
;
x = y =
10
;
System.out.println( x +
" "
+ y );
//$NON-NLS-1$
}
解决方案
在独立的语句中分配变量。
public
static
void
main(
String
[] args ) {
int
x =
0
;
int
y =
0
;
x =
10
;
y =
10
;
System.out.println( x +
" "
+ y );
//$NON-NLS-1$
}