public class Texst {
public static void main(String[] args) {
/*
* //加载spring的配置文件 ApplicationContext con=new
* ClassPathXmlApplicationContext("applicationContext.xml"); USB
* usb=(USB) con.getBean("usb"); usb.show();
*/
int index = 2;// 定义分组
// 将数组分为两个一组
int[] arry = { 10, 20, 11, 22, 33, 44, 321, 32134, 31232, 123, 457, 78,
89 };
Map<String, Integer> map = new HashMap<String, Integer>();
for (int i = 1; i < arry.length; i++) {
// 因为角标是从0开始的,所以要减去1;
if (i == (index - 1)) {
System.out.print("第" + (i - 1) + "个的角标所对应的值:" + arry[(i -
1)]
+ " " + "第" + i + "个角标多对应的值:" + arry[i] + " ");
index += 2;
} else if ((arry.length - 1) == i) {
System.out.print("第" + (arry.length - 1) + "个角标的值:" +
arry[arry.length - 1]);
}
// 换行
System.out.println();
}
System.out.println("map的大小" + map.size());
}
}
