Hey there I was wondering why the "return ask" here does not change the value of 'ask' when I print it out on my main method (it prints out 0 in the main but works in the Log method) and how I can fix it. Thanks in advance!
public static int Log(int ask){
int b=0;
int c =0;
c = scannerobj.nextInt();
b = scannerobj.nextInt();
ask = b*c;
System.out.println(ask);
return ask;
}
public static void main(String [] args){
int ask=0;
Log(ask);
System.out.println(ask);
}