[Solved] Java Multiple Choice Inquiry [closed]


It doesn’t print anything. when we invoke the method printVals() the value of k is 4 and therefore the expression k < 1 evaluates to false and method ends. It never goes to recursive call or print statement. However if you change the expression to if(k > 1) then it’ll print “Ann Cal Amy Ann” i.e. Option A

solved Java Multiple Choice Inquiry [closed]