Given number of rows, cols and the characters we have to create a two dimensional array and fill all elements with the given characters using java program.
Example:
Input
Enter size of the Array : 5 (rows are cols are same here)
Enter first character : @
Enter second character : *
Enter third character : #
Output
# @ @ @ #
* # @ # *
* * # * *
* # @ # *
# @ @ @ #
Program
Output