Question: 15 Consider the following method public String inSchoolMessage(int age) { if age 5 | age > 18) return not school aged: else return school aged:




15 Consider the following method public String inSchoolMessage(int age) { if age 5 | age > 18) return "not school aged": else return "school aged": } Which of the following code segments could replace the body of inSchoolMessage without changing its behavior? 1. if( age >= 5) { if( age 18) return "not school aged": else return "school aged" ; if( age >= 5) return "school aged"; else if (age
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
