a. Write a function prototype of the following: a function reCount() which
takes a string argument and a character argument and returns a boolean
value.
b. Write the general format of defining a function in a Java class?
c. Write two advantages of using functions in a program.
only right answers
Answers
Answered by
2
Explanation:
a.
boolean recount(String s,char ch)
{
return s.charAt(0)==ch;
}
b.
<return data type><space><function name> ( <arguments> )
{statement/s;}
c.
1.helps in division of program.
2.function calling may be benefitial for not writing a part of program many times.
Similar questions
Geography,
27 days ago
Math,
27 days ago
Math,
1 month ago
English,
1 month ago
Social Sciences,
9 months ago