Basics_Que_08

Home / Java Practice Question / Basics_Que_08

Basics_Que_08


WAP to check weather a given Number is positive , negative or zero......

program : 


public class Loop {

public static String numCheck(int num){
if(num>0){
return "Positive !!.."
} else if (num<0){
return "Negative !!...";
}else {
return "Zero !!...";
}
}

}