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
so it shoujld look like this
can i do this using 2 dim array ? Thanks.
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.
"markos" <firstname.lastname@example.org> 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
>so it shoujld look like this
>can i do this using 2 dim array ? Thanks.
I need it for study purposes.
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