0
Help, I need to return 0.
I need to return 0, but my code returns 9 https://code.sololearn.com/ceByuPOAZZLL/?ref=app
2 Answers
+ 15
public class Program
{
public static void main(String[] args) {
int a = 9;
HelloWorld();
a=setToNull(a);
/*đ âhere is the problem , U forgot to assign value in aâș */
print(a);
}
static void HelloWorld(){
System.out.println("Hello World!");
}
static int setToNull(int c){
return c = 0;
}
static void print(int x){
System.out.print(x);
}
}
+ 1
Thank you!