Hello, I need help for the following task.
I have to create an array as follows:
char b[]={'h','o','l','a'};
And in a new array copy that data and display the new array. Here is what I have for now.
public class arrayHola {
public static void main(String[]args) {
char b[]={'h','o','l','a'};
char c[]= new char[b.length];
for (int i = 0 ; i < c.length ; i++) {
System.out.println(c);
}
}
}
Thanks in advance.
I have already achieved what I was looking for with the following code: