Let's display matrices in different ways, however we want. OOP gives us a wonderful tool for this: method overloading. Overload the printMatrix method in 8 different ways. You should end up with 10 different printMatrix methods.
OOP: Method overloading
You must be signed in to leave a comment
30 June 2021, 09:57
Change the printMatrix value type, e.g. printMatrix(int m, int n, Integer value), change print statement and then call it in the same way as previous printMatrix method with String value! Do it again x7 times one for double, float, long, boolean, short, character, byte....Enjoy!!!
21 February 2019, 10:42
i get ans but not verify