1.What is wrong with the following snippet of code? Rewrite it so it produces the correct output.
if (a < b) if (a == c) System.out.println("a < b and a == c");else System.out.println("a is not less than b");
2. Assume numOne and numTwo
are integers. How many times might the following code print out grape? Explain your answer.
if (numOne > numTwo && numOne < numTwo) System.out.println("grape");else { if(numOne == numTwo) { System.out.println("grape"); if(numOne > numTwo) System.out.println("grape"); }//end if numOne == numTwo }//end else