| Author |
var-arg and array problem
|
Mohit G Gupta
Ranch Hand
Joined: May 18, 2010
Posts: 634
|
|
output:
cannot declare both go(int[]) and go(int...) in Widening1
static void go(int[] a2)
^
1 error
please explain ?
|
OCPJP 6.0 93%
OCPJWCD 5.0 98%
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
Hi, Mohit.
Here var-args internally represented as array, like
Compiler will do this. There is a conflict. There should be one.
|
 |
 |
|
|
subject: var-arg and array problem
|
|
|