How to use io expansion of navx in java

Hi can some please explain to me how to program the navx in java to use his io slots , thanks

Should just be a straight passthrough, no special programming required, just treat em as normal MXP pins.

like this?

public Spark intake = new Spark (9);

or some other way?

Yes, refer to the pinout description on the navX website, especially if you are using DIO pins as they are not sequential.

thank you both