I have the following code.
package p01;
import java.util.Scanner;
public class P01 {
private String estudiante;
private String nombre;
public static void main(String[] args) {
String[] estudiante = {"Nahum Deavila","Genesis Machado","Juan Giraldo","Jose Diana","Cindy Salazar"};
double[] definitiva = {1.0,2.0,3.0,4.0,5.0};
int i;
for (i = 0; i < definitiva.length; i++) {
System.out.print("Estudiante " + estudiante[i] + " Definitiva : " + definitiva[i] + "\n");
}
}
}
'
How can I do so that instead of printing the name and the definitive one I can put a condition that if it is higher than 3.0 it approved the subject. I do not know how to fit it in the code. Thanks.