+ 2
Whats wrong with my code
7 Antworten
+ 1
It is not possible here for creating more than one scanner object for a single program.
Create it in main class as static object or in class level scope then use it for all inputs required in class class.
Edit: Anurag Chaurasiya
This way you can do, if you want add while loop..
But there you are mishandling for loop for getElements() methods.. There is no need loop for that...
https://code.sololearn.com/c65CedLtoMyp/?ref=app
+ 1
Break down into individual or give sample input..
What error you you getting, give details.. It helps to identify errors easily...
Edit :
Not enough details as your program is large..
May you are troubling in giving inputs.. You Program need lot of inputs.. So you missing some may be.. Error telling that not giving input........
What inputs you are giving totally..?
0
Add public to your testPoints class
0
I'm getting error that in line 24 and 40 null pointer exception show
0
starting from main method....
I'm giving the following inputs....
1 2 2 2 2 2 1 2 3 4 5 6 7 8 3 4 5 6 7.
1 to create matrices.. 2 row of 1st matrix, 2 column of 1st matrix, 2 row of second matrix, 2 column of 2nd matrix,
2 to enter elements.... 1 to 4 elements of 1st matrix as loop will work four times for each matrices, 5 to 8 elements of 2nd matrix.
3 to see transpose of both matrices.
4 to add both matrices.
5 to get difference of both matrices.
6 to product &
At last 7 to exit.
0
Jayakrishna🇮🇳 THANKYOU so much
0
You're welcome...