Write 1 line If statement using ternary operator in JAVa
I assume your actual code looks like this: if (preconditionflag.equals(“skip”)){ System.out.println(“Skipping this testcase due to earlier testcase failed”); flag = “skip”; } else { flag = “pass”; } If not, the answer to your question is already no, because you can’t return from a method in one part and not return from a method in … Read more