How do you?
Hi,
how do you design a static method that takes two arguments, the name of the file and a reference to a char array.
The file should be opened, the contents of the array should be written to the file.
And then call it in the main.
i have something like this but it is not working.
publicclass Test{
}
Test(){
char[] a ={'a','b','c','d','e','f'};
}
static witeArray(char[] a, String file){
for (int i = 0 ; i < a.length ; i++ )
System.out.println(a[i] +" ");
}
the out put should look like this:
The characters read are:
a b c d e f

