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

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -