Am missing something? I am not seeing in the lesson where it tell us how to call a method? Is it in an earlier lesson? After a few trial and errors I figured it out but, should't "how to call a method" be added the lesson?
No instructions on how to call a method
Resolved
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Pavlo Plynko Java Developer at CodeGym
10 September 2019, 06:25
Yes, in previous lessons the method call has not yet been explained. You can try to figure it out yourself. Or skip this task and go back to it later, after the relevant lesson.
0
karina abad Software Developer at Intuit
26 June 2019, 23:20
to call a method, you just need to "call" it by placing the method name and passing an argument through it. for ex. public static String name(String s) {System.out.print(s);} , so in the main method you'd type in name(Karina); and the output would be Karina because what the name method does is return a String s which is what you "pass an argument" through with whatever name you want to show on the output.
But it was on an earlier lesson about creating methods and passing arguments I think though not exactly sure which one it was.
0