public class Main {

    public static void main(String[] args) {
        double nota = 3.1;

        if (aprobo(nota)) {
            System.out.println("Aprobó");
        } else {
            System.out.println("No aprobó");
        }
    }

    public static boolean aprobo(double nota) {
        if (nota >= 3.0) {
            return true;
        } else {
            return false;
        }
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: