0

Java: Why is their no output? Please help.

public class Numbers { public static void main(String[] args) { int ten = 10; int five = 5; } public static void sum(int five, int ten) { int addMainVars; addMainVars = ten + five; System.out.println("10 + 5 is " + addMainVars + "."); } } I don't see anything wrong with it. Please help.

10th Aug 2018, 8:13 PM
Fleet
Fleet - avatar
2 Answers
+ 2
That's the correct code. Hope it helps you. https://code.sololearn.com/ciXZW8Tmi0JE/?ref=app
10th Aug 2018, 8:37 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
0
Thank you very much! Thou hath saved me.
11th Aug 2018, 2:06 PM
Fleet
Fleet - avatar