class ArrayAsArgument
{
static void m1(int a[])
{
for(int i=0;i<a.length;i++)
{
System.out.println(a[i]);
}
}
public static void main(String[] args)
{
int a[]={1,2,3,4,5,6,7,8,9,10};
m1(a);
}
}
Thanks
Happy programming
{
static void m1(int a[])
{
for(int i=0;i<a.length;i++)
{
System.out.println(a[i]);
}
}
public static void main(String[] args)
{
int a[]={1,2,3,4,5,6,7,8,9,10};
m1(a);
}
}
Thanks
Happy programming
No comments:
Post a Comment