logo

Crowdly

P9. Considera la següent funció esPositiu que retorna  true si un nombre és p...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

P9. Considera la següent funció esPositiu que retorna true si un nombre és positiu i false si no ho és:

Per provar que el mètode esPositiu funciona correctament amb un número negatiu, quin mètode d'assertion hauríem d'utilitzar?

public class Utils {

    public static boolean esPositiu(int numero) {

        return numero > 0;

    }

}
More questions like this

Want instant access to all verified answers on www.vidalibarraquer.net?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!