Computer Science, asked by eshanshinde52, 1 month ago

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 sahilbadhiyasongs
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