Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thanks.! :)
This is the Output Log
Entered the Constructor
Error - Null
msg - null
----------
Entered the Constructor
size => rows = 2 cols = 2
1.0 2.0
Error - Null
msg - null
----------
Entered the Constructor
size => rows = 2 cols = 3
1.0 2.0 3.0
1.0 2.0
Passed Printing
Error - Index
msg - Index 2 out of bounds for length 2
----------
Reached Exit
The Error Message :-
should throw IllegalArgumentException if array is null: expected null, but was:Matrix@769e7ee8
Its always the same data. And the message is the above one or Test Failed. I tried different Exceptions but none worked. Also No Exception still doesn't works.
Cannot use other than runtime Exceptions because the methods in the class creates the Matrix object by this constructor and then returns them. Like -> return new Matrix(someData);
IndexOutOfBoundsException occurs due to the short length (2 rather than 3 as row 1) of 2nd row
What to do.?
yup throwing the exception but it still wont work.
clone(element) a function to copy all the elements to new array and return.
I pass all the tests except one test1Init.
It says:
test1Init
should throw IllegalArgumentException if array is null: expected null, but was:Matrix@14d3bc22
can someone help.?
Thanks! It worked!