Hi!
- My metod has 4 int parameter, and return true if least one of those parameter
can be dividable with 5. otherwise return false. - if least two or three of those parameter can be dividable with 5.
Code:
class Test{
public static void main(String[]args){
NumberTest myNbr=new NumberTest();
int result=myNbr.getMinNbr(3,1,9,6);
System.out.println(result);
}}
class NumberTest{
int divid=0;
public int getMinNbr(int nbr1,int nbr2, int nbr3, int nbr4){
if(nbr1%5==0)
delbart=nbr1;
else if(nbr2%5==0)
divid=nbr2;
else if(nbr3%5==0)
divid=nbr3;
else if(nbr4%5==0)
divid=nb;
return divid;
}}
My question:
- How I can return true or flase
- How the program puts out two or more digit if these are true.
- if all oh them have the same value.
thanks
Peter