-
arrays
hi i am learning java and run into a problem with an array. Can anyone tell
me how to use a 2 dim array ? I need to store a name for example and a grade
value
so it shoujld look like this
Angel 4
Micheal 3
etc..
can i do this using 2 dim array ? Thanks.
-
Re: arrays
Hello markos:
Sure, you can store anything you want in an array - including objects, which
might be the way to go here. Instead of creating a 2D array, why not create
objects that have two instance variables, a String and and int, and then
store the objects in a single array. That way you won't have to keep track
of all of those indices.
HTH,
Tom Duffy
"markos" <markospolo@aol.com> wrote:
>
>hi i am learning java and run into a problem with an array. Can anyone tell
>me how to use a 2 dim array ? I need to store a name for example and a grade
>value
>so it shoujld look like this
>Angel 4
>Micheal 3
>etc..
>can i do this using 2 dim array ? Thanks.
-
Re: arrays
I need it for study purposes.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks