android - can't use Arrays.copyOfRange -



android - can't use Arrays.copyOfRange -

i don't seem able access arrays.copyofrange in android project in eclipse indigo 3.7.1 on ubuntu 11.10.

my jre java-6-openjdk thought included arrays.copyofrange

for example, if have code:

int[] debug = new int[5]; int[] x = arrays.copyofrange(debug,0,4);

eclipse tells me

the method copyofrange(int[], int, int) undefined type arrays

i don't understand because android reference arrays includes method arrays.

any ideas?

the method arrays.copyofrange() wasn't introduced until api level 9. create sure using minimum sdk.

also, indexing incorrectly. in java if have array of size 5 indices range 0->4

change code this:

int[] debug = new int[5]; int[] x = arrays.copyofrange(debug,0,4); // utilize 4 instead of 5

android eclipse

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -