Alternative to Fixed-Size Arrays in Java?
问题 [ Context: new to Java, 4 months tops; old hand at C++. ] I'm working on a library that requires an array of a fixed size ("fixed string") in many places. I'm trying to use Dependency Injection (q.v.) for this particular problem, so I would like something of the form: class Foo { private Bar injectedBar; private char[] injectedFixedString; Foo(Bar injectedBar, /* what can go here? */ char[5] injectedFixedString); { /* initializing code goes here /* } } Simple is required -- this is going into