A magic square is an arrangement of distinct integers in asquare grid where the sum of numbers in each row, each column andboth of the major diagonals (called main and secondary) add up tothe same “magic” constant. Write a method that accepts a 2dimensional array, and returns true or false on whether or not thearray that is passed in is a magic square
*******Please answer in java

Question 2: A magic square is an arrangement
PayPal Gateway not configured
PayPal Gateway not configured