Examples of method call

package li;

public class Test {
public static int fun(int x){
if(x>0){
return 1;
}else if(x==0){
return 0;
}else{
return -1;
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
int x=10;
System.out.println(fun(x));

}

}

Published 48 original articles · won praise 0 · Views 507

Guess you like

Origin blog.csdn.net/m0_45133750/article/details/104735738