0
Clarify
So what in the script would be the method... in laiman's terms
3 Answers
+ 2
You haven't shown us any script. So this is not answerable.
Are you asking 'what's a method'?
+ 2
In laymens terms:
A method is a block of code that has a name, where the name can be used to call the method. A method is also inside of a class.
A block of code is given by:
{
}
Where everything between these brackets is what will be executed by the method. (From top-down).
To call a method, means the program will now run whatever is in the methods block of code.
Methods also have something called a 'return type'. This is explained further in the course, but for now know that 'void' means the method doesn't return anything.
Examples of methods:
class someClass{
void myMethod(){
/*
Return type - Name - Parameters - Block of code
*/
}
public static void main(String[] args){
// The main method!
/* Do not worry about what public or static means for the time being */
}
}
0
yes...