I have class test2 with an 3D array named as decision_variable. I define setter and getter for this array.I'm not sure is correct or not and then in the main class I want to set value for example decision_variable =1
Your setDecision_variables() method is declared to take a single input parameter, a 3-d int array.
You call it on line 31 passing "=1" which is certainly not a legal 3D int array.
Your setDecision_variables() is declared as a method that takes no parameters and returns a 3D int array.
On line 32 you call it with the illegal syntax "" as an argument, but declared it as a method that takes no arguments.
Perhaps you mean something like:
Note that this is probably not the best way to do things. A better way would be do declare the methods taking three indices:
and similarly for the setter.
Note that you should also check the validity of the indices passed.
Montana has cold dark nights. Perfect for the heat from incandescent light. Tiny ad:
ScroogeXHTML 8.2 - easy to use RTF to HTML converter library