ye i forgot to put on // on that line Calculator.sum(num1, num2);, so the compiler ignores my statement and use yours. but oh my god.. changing static int print() { to static void print() { did it,...
Type: Posts; User: xways
ye i forgot to put on // on that line Calculator.sum(num1, num2);, so the compiler ignores my statement and use yours. but oh my god.. changing static int print() { to static void print() { did it,...
the error is right after the System.out.println("Sum of the numbers: " + theSum); which is line24, and pointing to the next "}" bracket.(line25)
import java.util.Scanner;
public class...
thanks again for the quick reply, yes i tried that already too but now i just copied yours in case my brain melted already these days im trying to figure that out and well it still doesnt work... :/...
yes i understood, it basically cannot find sum in the Printer class. So thats the question im asking for, how to get that sum value from the Calculator class into the Printer class to print its value...
Hey thanks for reply.
Just to let u know, i tried alot of diffrent things in this line of code too, but this is the last i left in this line, anyway the error msg is:
ObjectFunctionality.java:24:...
Hello, i cant get the return value to my Printer class from the Calculator class method. i have just started to learn about objects/constructors and in some way i cant understand it, even though i...