如何手动为数组分配变量?下面是一个代码片段。
我不想手动输入 shortStraight[0] = "211100", shortStraight[1] = "021110"
,请问有什么方法吗?
private String [] shortStraight;
public Sample () {
shorty = new String [12];
shorty = {211100, 021110, 002111, 121100, 112100, 111200, 012110, 011210, 011120, 001211, 001121, 001112 } //this line doesn't work.
有需要帮助的吗?