public class Main {
public static void main(String args[]) {
sumArray(8);
}
public static int sumArray(int nums){
assert nums == 5;
return nums;
}
}
Hi I was just wondering, when i pass a number that is not equal to 5, why doesnt the compiler throw any errors, since I am asserting that nums is equal to 5?
Aucun commentaire:
Enregistrer un commentaire