Possible lossy conversion from long to int, JAVA

主宰稳场 提交于 2019-11-27 16:16:10

Array dimensions can only be int types. The compiler is expecting that type but you are passing in a long type. You could change the argument type being passed in to an int and the make the corresponding changes.

For completeness, here is what the JLS says about variables in an array

they are referenced by array access expressions that use non-negative integer index values.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!