阅读背景:

关于在java中填充String []

来源:互联网 

I wrote a class and declare a String[5] in class; then i tried to assign value to this array in class body directly without a method. I got tons of errors. Then I tried to define a method to called later to populate this array. No error this time. I don't understand why i can't assign value in class body directly, like this: aString[0] = "today". New to java. I know I missed some important concepts. I tried to google and didn't find a answer. Please help me to explain it.I wrote a class and declare a String[5] in clas




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: