摘要:
1 local array = {}; 2 local row1 = {1, 3, 5, 7, 9} 3 local row2 = {2, 4, 6, 8, 10} 4 local row3 = {"I", "love", "lua"} 5 array[1] = row1; 6 array[2] = row2; 7 array[3] = row3 8 print("length ... 阅读全文
摘要:
新建一个Test 类,添加一个方法Test1(),添加如上代码,在main方法中调用。 输出结果为:count = 3 capacity = 4 如果length = 0,输出结果为 count = 0 capacity = 0 如果length = 1,输出结果为 count = 1 capaci 阅读全文