Computer Science, asked by Prabudh0071, 1 year ago

Write a function prototype for a function"My function"that has one string Variable S and one integer variable CH as parameters and returns true or false.

Answers

Answered by abhinav2727
1
public class abc{
int a = 0;
int c = 0;

public
boolean My_function(int S,int CH)
{
a=S;
c=CH;
//body of method
if(S==CH)
true:
return true ;


//body of method
else

return false ;
}


}




This worked for me.. Function will be same.., but you can call it in some other class.., for output. As getting output from a Boolean directly will be a bit complicated.
Similar questions