public boolean same_State (Search_State s2) { Jugs_State js2= (Jugs_State) s2; return ((j1==js2.get_j1())&& (j2==js2.get_j2())); }
I just want to know what the part :
does.Jugs_State js2= (Jugs_State) s2;
I know you can create an object by e.g. Classname object = new Classname() but
what is this "(Jugs_State)" in the brackets and why is there no "new" and why is
there a new variable "s2" after that.
Finally, what is the return doing at the end?
Thanks a lot, I just need a general answer of what the code is doing
not exactly what my classes do (that's why I haven't included all the code
it's long).