Whenever I write code that includes ArrayUtil, it causes an unexpected error:
int[] values = ArrayUtil.randomIntArray(30, 300);
I use Eclipse to write my code, and there is always a red underline in the "ArrayUtil" section. What am I doing wrong?
Which package does your ArrayUtil own? No one can answer with certainty without this information.
Did you get here ? If so, your signature looks correct. You probably haven't imported it yet, or the class is not in your CLASSPATH. Eclipse tells you to fix one or the other.
, , squiggly Eclipse:
Ctrl + 1
, , , , ArrayUtil Eclipse . , ArrayUtils Apache Commons Lang. , , ArrayUtil, .
ArrayUtil
ArrayUtils
, Eclipse -, Commons-Lang . , - ( , ), . , ArrayUtil .
Eclipse , ArrayUtil. import ?
import
Java API , Eclipse . , Java EE 5, "ArrayUtils", "s", Apache commons, , ? jar .
, ArrayUtil.randomIntArray(30, 300);
, jar classess, .
, , , , java builtin util, , url
http://java.about.com/od/javautil/a/randomnumbers.htm
http://www.javapractices.com/topic/TopicAction.do?Id=62