You have declared:
public double MaxKiv() {
So yes, obviously this gives you a double. To get an int instead, simply change the declaration to return an int:
public int MaxKiv() {
The value you are returning, index, is already declared an int, so this should be enough fix your issue.
0
solved How to find the maximum’s index?