请编写方法int[]invertArray(int[]a),该方法返回一个数组b,b中元素顺序为数组a 中元素的逆序。 int[] invertArray(int []a){ //请在答题卡(纸)上填写此处应编写的代码 }
int[]b=new int[a.length];for(int i=0;ib[i]=a[a.length-i-1];}return b;
扫描二维码免费使用微信小程序搜题/刷题/查看解析。
版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。
本文链接:https://doc.20230611.cn/post/437868.html
上一篇:无菌
下一篇:试述高等教育管理的常用方法。