Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TwoDimArryAlloc {
- public static void main(String[] args) {
- int itemno[][] = new int[][] { {2234,2235,2236,2237,2238} , {3334,3335,3336,3337,3338} };
- int it;
- String itemdesc[][] = new String[][] {{"Womans Item1","Womans Item2","Womans Item3","Womans Item4","Womans Item5"},{"Mans Item1","Mans Item2","Mans Item3","Mans Item4","Mans Item5"}};
- for (int i=0; i<2; i++)
- {
- for(int j=0; j<5; j++)
- {
- System.out.println(itemno[][]);
- }
- }
- }
- }
- System.out.println(itemno[i][j]);
- ^ ^
- System.out.println(itemno[i][j]);
- ^ ^
- System.out.println(itemno[][]);
- System.out.println(itemno[i][j]);
- {
- int itemno[][] = { {2234,2235,2236,2237,2238} , {3334,3335,3336,3337,3338} };
- int it;
- String itemdesc[][] = {{"Womans Item1","Womans Item2","Womans Item3","Womans Item4","Womans Item5"},{"Mans Item1","Mans Item2","Mans Item3","Mans Item4","Mans Item5"}};
- for (int i=0; i<2; i++)
- {
- for(int j=0; j<5; j++)
- {
- System.out.println(""+itemno[i][j]);
- }
- }
- }
- }
- System.out.println(itemno[i][j]);
- System.out.println(itemno[i][j]);
Add Comment
Please, Sign In to add comment