Array answer[i] to if Java -


int count=0,answer[2,4,3,2,1]; 

the problem :" ']' expected.

how solve want first answer answer[0] second answer[1] , all.

you cannot use regular int declaration array unless include brackets in variable name answer[], also, array values defined curly braces:

int count = 0; int[] answer = {2,4,3,2,1}; 

or

int count = 0, answer[] = {2,4,3,2,1}; 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -