What I want to do is to take a 2d int array and use it to create a Matrix (a class I will be defining) which will effectively wrap all the values of the 2d array together so that I can perform matrix multiplication for coordinate translation. I am rather confused as to how I would do this however. My main problem that I can't figure out is that how can I create the Matrix object so that I can still access specific value at a row and column location (since it won't be an 2d array anymore I can't go something like 'matrix[i][j]')? Anybody have any ideas, or am I approaching this completely wrong?
Jump to Post
it won't be an 2d array anymore I can't go something like 'matrix[i][j]')? Anybody have any ideas, or am I approaching this completely wrong?
While in other languages such as C# or C++ you have operator overloading, there's no such feature in Java.
Your best bet is creating …
All 3 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.