Question: Write a function with return type Boolean and name it add. It must take 2 parameters both integers. It adds the two parameters and if
Write a function with return type Boolean and name it add. It must take parameters both integers. It adds the two parameters and if its negative or O returns true otherwise false
public boolean addint a int b
int temp ;
if temp
return true;
return false;
public boolean add int a int b
int temp ;
if temp
return true;
return false;
public boolean add
int temp a b;
if temp
return true;
return false;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
