java - Using genio with array -
hi i'm trying program work ask user input arrays using bluej, planning on using genio when type code below following message:
incompatible types: int cannot converted int[]
public class arrays { public int[] numbers; public void testintegerarray() { numbers = new int[4]; (int = 0; < numbers.length; i++) { numbers = genio.getinteger(); system.out.println(numbers[i]); } } }
genio.getinteger();
// returns integer
your assigning integer array can't.
add integer array need:
numbers[i] = genio.getinteger(); //your forgot [i]
Comments
Post a Comment