copy 2D array / compare them
in
Programming Questions
•
1 year ago
hello all,
I have a question regarding 2D arrays like
Is it possible to say
From my tests: yes.
Or use arrayCopy?
Is it possible to say
From my tests: no.
But how can I compare them? In a for loop?
And finally regarding call by ref / call by val:
I think yes.
I know, this is all very basic and has been asked before but I couldn't find it.
Thanks!
Chrisir
I have a question regarding 2D arrays like
- int [][] someStuff;
Is it possible to say
- arr1=arr2;
From my tests: yes.
Or use arrayCopy?
Is it possible to say
- if (!arr1.equals(arr2))
- println("arr1 != arr2 ----------------------------");
From my tests: no.
But how can I compare them? In a for loop?
And finally regarding call by ref / call by val:
- arr1=makeMove(arr2, x1, y1, dir );
I think yes.
I know, this is all very basic and has been asked before but I couldn't find it.
Thanks!
Chrisir
1