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
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Programmer Certification (OCPJP)
arrays
Hasitha Randika
Ranch Hand
Posts: 50
posted 14 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 14 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 14 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 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Mahesh Adhi
Greenhorn
Posts: 5
posted 14 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 14 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
A magnificient life is loaded with tough challenges. En garde tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Array
Multydimensional Arrays
Array Problem
arrays
doubt regarding the output??
More...