steps to execute a function in java
Answers
Answered by
1
1
A method is the equivalent of a function in languages like C which helps in code reusing. A set of statements make a method, and this method can be invoked through other statement. When invoked (called) , all the statements that are a part of the method would be executed. For instance, look at this method: "public static void methodExample() {}". It currently has no code in it, but there are three keywords before the method name. There is public, static, and void.
A method is the equivalent of a function in languages like C which helps in code reusing. A set of statements make a method, and this method can be invoked through other statement. When invoked (called) , all the statements that are a part of the method would be executed. For instance, look at this method: "public static void methodExample() {}". It currently has no code in it, but there are three keywords before the method name. There is public, static, and void.
Shivesh08:
i have to write it step by step
Similar questions
History,
7 months ago
English,
7 months ago
Math,
7 months ago
Social Sciences,
1 year ago
English,
1 year ago
Accountancy,
1 year ago
English,
1 year ago