Computer Science, asked by CodmicAbhishek3825, 2 months ago

WAJP to create a class and exhibit the role of static functions (other than main) by declaring, defining and calling them.

Answers

Answered by sonabardar
0

Explanation:

In Java, the static keyword can be used with variable, constant, and functions. The main purpose of using the static keyword is to manage the memory so that we can use the memory efficiently. In this section, we will discuss the static function in Java.

Static Function

If the keyword static is prefixed before the function name, the function is called a static function. It is often called a method.

A method is a group of variables and statements that functions together as a logical unit. Like fields, methods can have modifiers (like private, public, or static). Methods also have a return type (may be void if the method returns nothing). The return type can be a reference type (such as an object or an array). A method can have any number of parameters or arguments.

Similar questions