wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Multiple Dimension Array!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Multiple Dimension Array!!!" Watch "Multiple Dimension Array!!!" New topic
Author

Multiple Dimension Array!!!

Brian Smith
Ranch Hand

Joined: Oct 26, 2002
Posts: 232
hi folks,

like i said in comments in the code,i am reating, if i am not wrong, 3 elements inside myIntVal[0][0]. how do i get access to each one of these elements inside myIntVal[0][0]? i hope i have been able to make myself clear.
thanks.
chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
Namaste,
The way you define myIntVal array, it does have three elements in myIntVal[0]
. <- not myIntVal[0][0]
the way to access them are myIntVal[0][0], myIntVal[0][1], myIntVal[0][2] respectively.

the output is
myIntVal[0][0]= 0
myIntVal[0][1]= 0
myIntVal[0][2]= 0
[ June 23, 2003: Message edited by: chi Lin ]

not so smart guy still curious to learn new stuff every now and then
 
Consider Paul's rocket mass heater.
 
subject: Multiple Dimension Array!!!
 
Similar Threads
I need Help
Stack issue (push, pop, peak)
array doubt
Where i am going wrong in this Array Initializatiion ?
Array Questions