What's the difference? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

What's the difference?

I'm not understanding how this is any different than the following: class MyClass { public static void main(String[] args) { System.out.println("Hello World!"); } } // they both execute Hello World! when they're run.

10th Apr 2019, 2:59 PM
Nathan Gregory
Nathan Gregory - avatar
2 Réponses
+ 1
So sorry! In hindsight I realize that my post didn't link to the original code. Here's the original code for context: class MyClass { static void sayHello() { System.out.println("Hello World!"); } public static void main(String[ ] args) { sayHello(); } } // Outputs "Hello World!" It was under Java > Classes and Objects > Methods
10th Apr 2019, 4:06 PM
Nathan Gregory
Nathan Gregory - avatar
+ 1
Thanks! After reading I realize I need to learn the fundamentals; the "why's" of coding. I appreciate your quick response!
10th Apr 2019, 4:32 PM
Nathan Gregory
Nathan Gregory - avatar