示例
public
static
void
main(
String
[] args ) {
String
notClear1 =
null
, notClear2[] =
null
;
notClear1 = args[
0
];
notClear2[
0
] = args[
1
];
}
解决方案
分开声明基本变量和数组变量。
public
static
void
main(
String
[] args ) {
String
notClear1 =
null
;
String
[] notClear2 =
null
;
notClear1 = args[
0
];
notClear2[
0
] = args[
1
];
}