Why the program use the method " public static int initializeArray() "? it is confused me. it would not be easier to put it directly in the main method by omitting this method
i found the solution but i have a ask
You must be signed in to leave a comment
26 December 2019, 14:52
This task is demonstrating different uses of methods. In object oriented programming (OOP) you don't want all your code in the 'main' method. Using different classes and methods makes the code more robust and easier to debug in later stages. So while these tasks don't necessarily demonstrate the full power of OOP , they start introducing you to the some concepts gently.
26 December 2019, 20:53
Thanks a lot