For instance, give row = 4, col = 5, print matrix in zigzag order like: [1, 8, 9, 16, 17] [2, 7, 10, 15, 18] [3, 6, 11, 14, 19] [4, 5, 12, 13, 20] package GooglePhone; import java.util.Arrays; public class PrintMatrix { static void print(int rows, in…