Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2
A method can be created/declared anywhere in the class because it isn't used/read until it is called. Placement only matters for readability. You can lump all your methods at the bottom of the class if you want, or you can put methods near the code that is calling them to aid in remembering what they do.
29th Jun 2016, 1:39 AM
James
James - avatar