Is there any difference between the following?
Example 1:
public class OddEven {
private static void OddEven() {
}
public static void main(String[] args) {
OddEven();
}
}
Example 2:
public class OddEven {
private static void main(String[] args) {
OddEven();
}
private static void OddEven() {
}
}
The reason I ask is because I will always go with Example 2 by first putting Main. Although most of the examples that I saw on the Internet first impose methods before Main.
I have never had official lessons, and I apologize if this is an obvious question, but I would like to know:
- Is the layout order just aesthetic or conditional?
- Does processing efficiency and / or memory matter?
- If so, is this salvation visible in all programming languages?
Thanks for any help on this topic.
source
share