legilimen 0 Newbie Poster

When i do something like

static int call (Object a){
}

main(){
call(10);
}

it works because of autoboxing

But why didn't the language designers support something like this ?

static int call (Object []a){
}

main(){
int []a = new int[10];
call(a);
}

Why didn't they support something like this. Went through JLS but couldnt find what i wanted.

Thanks in advance for your time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.