Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
arrays
Hasitha Randika
Ranch Hand
Posts: 50
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
You can also declare and initialize this array as follows
int[][]a1 = new int[3][]; a1[0] = new int[] {1,2,3}; // From a1[0][0] ... a1[0][2] a1[1] = new int[] {4,5,6}; // From a1[1][0] ... a1[1][2] a1[2] = new int[] {7,8,9,10}; // From a1[2][0] ... a1[2][3]
MooN
Mahesh Adhi
Greenhorn
Posts: 5
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i think by observing above picture you will get an idea.
in that initialization is like below.
int[][] myInts = { {1, 2, 3}, {91, 92, 93, 94}, {2001, 2002} };
Mahesh Adhi
Greenhorn
Posts: 5
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Mahesh Adhi
Greenhorn
Posts: 5
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 16084
88
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The URL of your picture is:
http://desktop/Arrays.bmp
That's not a valid address on Internet...
Jesper's Blog
-
Pluralsight Author Page
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Array
Multydimensional Arrays
Array Problem
arrays
doubt regarding the output??
More...