Computer Science, asked by Shruti29473, 10 months ago

how to take array as parameters

Answers

Answered by nain31
2
take a variable initialised as zero.. then take it as parameter..ex.
Class d
.int f= 0;
.. int r() =new int(10);
public void c(int f)
(
sopln("enter any no.");
r(f)=ip;
f±±;
)
psvm
int k;
d obj=new d();
sopln("enter the value ");
k=ip;
obj. c(k);
)
)
note:
it's an sample program form Java io package for ur answer.
ip-Integer. parseInt(in.readLine());

hope it helps

Shruti29473: hi
Similar questions