What is function?What are the types of function?Explain with an example. in java
Answers
Answered by
1
Answer:
A return type function returns only one value. A function is a derived type because its type is derived from the type of data it returns. The other derived types are arrays, pointers, enumerated type, structure, and unions. Basic types: _Bool, char, int, long, float, double, long double, _Complex, etc.
Answered by
0
Answer:
In Java, all function definitions must be inside classes. We also call functions methods. Let's look at an example method
public class Main
{
public static void foo()
{
// Do something here
}
}
https://www.programiz.com/java-programming/methods.....refer to this
Similar questions