KnowledgeBoat Logo
|

Computer Applications

What are the three types of functions in Java?

User Defined Methods

11 Likes

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.

Answered By

6 Likes


Related Questions