ICSE Class 10 Computer Applications Question 16 of 43

User-Defined Methods — Question 16

Back to all questions
16
Question

Question 14

What are the three types of functions in Java?

Answer

The three types of functions in Java are-

  1. Computational methods — The methods that calculate or compute some value and return the computed value. Computational methods always return a computed result. For example, Math.sqrt( ) and Math.cos( ).
  2. Manipulative methods — The methods that manipulate information and return a success or failure code. Generally, if value 0 is returned, it denotes successful operation; any other number denotes failure.
  3. Procedural methods — The methods that perform an action and have no explicit return value. For instance, System.out.println() method is a procedural method.