Question: how initialize 2d array in java?
Answer: //Java Program to illustrate the use of multidimensional array.
class Testarray3{
public static void main(String args[]){
//declaring and initializing 2D array.
int arr[][]={{1,2,3},{2,4,5},{4,4,5}};
//printing 2D array.