Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

arrays

 
Hasitha Randika
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i would greately appriciate if somebody help me in this case
how to draw the multidimensional array to the following question?

class A{
public static void main(String ar[]){
int[][]a1 = {{1,2,3},{4,5,6},{7,8,9,10}};
System.out.println(a1[0][2]+","+a1[1][0]+","+a1[2][1]);

}
}
 
Abdullah Mamun
Ranch Hand
Posts: 99
Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

You can also declare and initialize this array as follows
 
Mahesh Adhi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



i think by observing above picture you will get an idea.

in that initialization is like below.
 
Mahesh Adhi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Mahesh Adhi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello all,

i am sorry for this, i hav tried twice but the picture is at my desk is not loading properly, if any one jst contact me.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15438
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URL of your picture is: http://desktop/Arrays.bmp

That's not a valid address on Internet...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic