import java.util.Arrays; public class Main { public static void main(String[] args) { char[] a1 = new char[] { 'a', 'b', 'c', 'd' }; char[] a2 = new char[] { 'a', 'b', 'c', 'd' }; System.out.println(Arrays.equals(a1, a2)); } }