Why is this statement in a Java programming code invalid?
args[i] = Integer.parseInt(args[i]);
Note: Yes, I'm converting an array of String data type to integer type
values and storing it to the same array. But, this efficient code result
in an error, why? Is it because the entire array is marked as String while
it's being converted which is why it is an error, or?
No comments:
Post a Comment