0

Clarify

So what in the script would be the method... in laiman's terms

25th Sep 2017, 8:56 PM
Adam Barber
Adam Barber - avatar
3 Answers
+ 2
You haven't shown us any script. So this is not answerable. Are you asking 'what's a method'?
26th Sep 2017, 12:34 AM
Rrestoring faith
Rrestoring faith - avatar
+ 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 */ } }
26th Sep 2017, 2:07 AM
Rrestoring faith
Rrestoring faith - avatar
0
yes...
26th Sep 2017, 1:56 AM
Adam Barber
Adam Barber - avatar