# How to get array.length after calculating greater(less) than?

Alright, so i have numbers that i need to calculate in this code. And i need to calculate all the array numbers above 5.5 and set them into a .length so i can calculate the amount of sufficient scores. I also need to do this in the opposite. My attempt at the second tab is shown below with a method called geefAantalVoldoendes.

I can’t wrap my head around this.

Also i would appreciate feedback on the code so i can improve and understand what you would do or what would be the better practice.

ALSO! Thank god for Open Draft on this forum. I made a bunch of code and the power just shorted - lost almost everything but the forum function actually saved my code, lol.

Main tab

``````String bestand = "cijfers_klein.txt";
//String bestandGroot = "cijfers_groot.txt";

void setup() {
size(600, 400);
int arrayLength = geefAantal(cijfers);
float arrayHoogste = geefHoogste(cijfers);
float arrayLaagste = geefLaagste(cijfers);
float arrayGemiddelde = geefGemiddelde(cijfers);
int voldoendes = geefAantalVoldoendes(cijfers);
}

``````

Second tab

``````/*
geefAantal,
geefHoogste,
geefLaagste,
geefGemiddelde,
geefAantalVoldoendes,
geefAantalOnvoldoendes
*/

return cijfers;
}

static final int geefAantal(float[] laadArray) {
println("Print aantal cijfers: "+cijfer);
return int(cijfer);
}

for (int i = 1; i < laadArray.length; i++) {
}
}
println("Print hoogste cijfer: "+cijfer);
return cijfer;
}

for (int i = 1; i < laadArray.length; i++) {
}
}
println("Print laagste cijfer: "+cijfer);
return cijfer;
}

for (int i = 1; i < laadArray.length; i++) {
}
println("Print gemiddelde cijfer: "+nf(cijfer, 1, 1));
return cijfer;
}

/*Voldoende is alles boven 5.5; dus GETAL >= 5.5 == voldoende.
- print lengte - alleen alles boven 5.5
*/
static final int geefAantalVoldoendes(float[] laadArray) {
float voldoende = 5.5;
for (final int i = 1; i < laadArray.length; i++) {
if (cijfer >= voldoende) {
}
}

return int(cijfer);
}

``````
``````@SafeVarargs static final int geefAantalVoldoendes(
final float voldoende, final float... laadArray) {
int counter = 0;