Created
November 26, 2017 03:50
-
-
Save rahulmalhotra/a18b4fb18325cb9b2fc4eef65a69837c to your computer and use it in GitHub Desktop.
Java program to make 2-D array without using new keyword
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 m2[][]={{1},{1,2},{1,2,3}}; | |
System.out.println(m2[0][0]); | |
//System.out.println(m2[0][1]); | |
//System.out.println(m2[0][2]); | |
System.out.println(m2[1][0]); | |
System.out.println(m2[1][1]); | |
//System.out.println(m2[1][2]); | |
System.out.println(m2[2][0]); | |
System.out.println(m2[2][1]); | |
System.out.println(m2[2][2]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment