All I'm trying to do is print the elements in a boolean array. But instead of getting the values of the elements which are either true or false, I get a weird output like this [Z@4517d9a3. I have read about the toString but this applies to string arrays. Here is my code :
public class Class{
public static void main(String[] args) {
boolean a[] = {true, false, true, false};
boolean[] x = show(a);
System.out.println(x);
}
public static boolean[] show(boolean a[]) {
return a;
}
}