当前位置 : 主页 > 编程语言 > java >

数组简单拆分

来源:互联网 收集:自由互联 发布时间:2021-06-28
数组简单拆分 public static void main(String[] args) throws JSONException {JSONObject json = new JSONObject();for(int x = 1;x=50;x++) {StringBuilder sb = new StringBuilder();sb.append(x);json.put(sb.toString(),x);}Iterator keys = json.
数组简单拆分
public static void main(String[] args) throws JSONException {
		
		JSONObject json = new JSONObject();
		for(int x = 1;x<=50;x++) {
			StringBuilder sb = new StringBuilder();
			sb.append(x);
			json.put(sb.toString(),x);
		}
		Iterator
 
   keys = json.keys();
		int[] arr = new int[json.length()];
		int[][] ary = new int[10][10];
		for(int x = 0;keys.hasNext();x++) {
			String key = keys.next();
			arr[x] = json.getInt(key);
		}
		for(int x = 0,data = 0,num = 0;x
 
网友评论