Created
November 26, 2017 03:41
-
-
Save rahulmalhotra/7b46d8245fe31e2bee2fe5508bd55b42 to your computer and use it in GitHub Desktop.
Java program to make 2-D Array with different columns for each row.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class array { | |
public static void main(String[] args) { | |
int m1[][]=new int[2][]; | |
m1[0]=new int[1]; | |
m1[1]=new int[2]; | |
m1[0][0]=1; | |
//m1[0][1]=2; | |
m1[1][0]=3; | |
m1[1][1]=4; | |
System.out.println(m1[0][0]); | |
//System.out.println(m1[0][1]); | |
System.out.println(m1[1][0]); | |
System.out.println(m1[1][1]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment