Can't believe I don't know the answer to this, but getting late and SO is my only hope of getting some decent sleep ;)
So far I know these are not it: assert solver.solveArray(array3) == -1 assert solver.solveArray(array3) == (-1)
Can't believe I don't know the answer to this, but getting late and SO is my only hope of getting some decent sleep ;)
So far I know these are not it: assert solver.solveArray(array3) == -1 assert solver.solveArray(array3) == (-1)
In what way do you know those aren't it? This short but complete program works fine:
public class Solver
{
public static void main(String[] args)
{
Solver solver = new Solver();
assert solver.solveArray(-1) == -1; // Pass
assert solver.solveArray(-1) == 2; // Fail
}
int solveArray(int x)
{
return x;
}
}
Hard to say based on what you've written, but you may need parentheses
assert( solver.solveArray(array3) == -1 )