java - Is it bug of JDK? -


this code throw

exception in thread "main" java.lang.arrayindexoutofboundsexception: 1

on last line. bug or what? (jdk 7)

int ar[] = {1,2,3}; list arlist = arrays.aslist(ar); arlist.set(1,8); 

no, arrays.aslist expects integer [], passing int[]. should fix it.

integer ar[] = {1,2,3}; 

Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -