June 2024
Beginner to intermediate
957 pages
16h 58m
English
In computer science, a subprogram is a block of statements packaged as a unit that performs a specific task. A subprogram can be called several times within a program, whenever that specific task needs to be performed.
In Java, a built-in method is an example of such a subprogram. Take the well-known Math.abs() method, for example. It consists of a block of statements packaged as a unit under the name “abs”, and it performs a specific task—it returns the absolute value of a number.
If you are wondering what kind of statements might exist inside the method Math.abs(), here ...
Read now
Unlock full access